diff --git a/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.deps.json b/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.deps.json deleted file mode 100644 index 9857f57116..0000000000 --- a/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.deps.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETStandard,Version=v2.0/", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETStandard,Version=v2.0": {}, - ".NETStandard,Version=v2.0/": { - "FSharp.Compiler.Service/43.8.100": { - "dependencies": { - "FSharp.Core": "7.0.0", - "FSharp.DependencyManager.Nuget": "8.0.100", - "NETStandard.Library": "2.0.3", - "System.Buffers": "4.5.1", - "System.Collections.Immutable": "6.0.0", - "System.Diagnostics.DiagnosticSource": "6.0.0", - "System.Memory": "4.5.5", - "System.Reflection.Emit": "4.7.0", - "System.Reflection.Metadata": "6.0.1", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "FSharp.Compiler.Service.dll": {} - } - }, - "FSharp.Core/7.0.0": { - "runtime": { - "lib/netstandard2.0/FSharp.Core.dll": { - "assemblyVersion": "7.0.0.0", - "fileVersion": "7.0.22.57105" - } - }, - "resources": { - "lib/netstandard2.0/cs/FSharp.Core.resources.dll": { - "locale": "cs" - }, - "lib/netstandard2.0/de/FSharp.Core.resources.dll": { - "locale": "de" - }, - "lib/netstandard2.0/es/FSharp.Core.resources.dll": { - "locale": "es" - }, - "lib/netstandard2.0/fr/FSharp.Core.resources.dll": { - "locale": "fr" - }, - "lib/netstandard2.0/it/FSharp.Core.resources.dll": { - "locale": "it" - }, - "lib/netstandard2.0/ja/FSharp.Core.resources.dll": { - "locale": "ja" - }, - "lib/netstandard2.0/ko/FSharp.Core.resources.dll": { - "locale": "ko" - }, - "lib/netstandard2.0/pl/FSharp.Core.resources.dll": { - "locale": "pl" - }, - "lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll": { - "locale": "pt-BR" - }, - "lib/netstandard2.0/ru/FSharp.Core.resources.dll": { - "locale": "ru" - }, - "lib/netstandard2.0/tr/FSharp.Core.resources.dll": { - "locale": "tr" - }, - "lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.NETCore.Platforms/1.1.0": {}, - "NETStandard.Library/2.0.3": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "System.Buffers/4.5.1": { - "runtime": { - "lib/netstandard2.0/System.Buffers.dll": { - "assemblyVersion": "4.0.3.0", - "fileVersion": "4.6.28619.1" - } - } - }, - "System.Collections.Immutable/6.0.0": { - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Collections.Immutable.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Diagnostics.DiagnosticSource/6.0.0": { - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Memory/4.5.5": { - "dependencies": { - "System.Buffers": "4.5.1", - "System.Numerics.Vectors": "4.4.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Memory.dll": { - "assemblyVersion": "4.0.1.2", - "fileVersion": "4.6.31308.1" - } - } - }, - "System.Numerics.Vectors/4.4.0": { - "runtime": { - "lib/netstandard2.0/System.Numerics.Vectors.dll": { - "assemblyVersion": "4.1.3.0", - "fileVersion": "4.6.25519.3" - } - } - }, - "System.Reflection.Emit/4.7.0": { - "dependencies": { - "System.Reflection.Emit.ILGeneration": "4.7.0" - }, - "runtime": { - "lib/netstandard2.0/System.Reflection.Emit.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.700.19.56404" - } - } - }, - "System.Reflection.Emit.ILGeneration/4.7.0": { - "runtime": { - "lib/netstandard2.0/System.Reflection.Emit.ILGeneration.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.700.19.56404" - } - } - }, - "System.Reflection.Metadata/6.0.1": { - "dependencies": { - "System.Collections.Immutable": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Reflection.Metadata.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.322.12309" - } - } - }, - "System.Runtime.CompilerServices.Unsafe/6.0.0": { - "runtime": { - "lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "FSharp.DependencyManager.Nuget/8.0.100": { - "dependencies": { - "FSharp.Core": "7.0.0", - "System.Reflection.Emit": "4.7.0", - "System.Reflection.Metadata": "6.0.1", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "FSharp.DependencyManager.Nuget.dll": {} - } - } - } - }, - "libraries": { - "FSharp.Compiler.Service/43.8.100": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "FSharp.Core/7.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-8hzwUheAViWMAHWQTr6kR/19C4LhjZ4TlftKfNeZO9y7XnRUzLTK6FJS1C+0oObuUe0e4KndYxjWE+Zgea9YXQ==", - "path": "fsharp.core/7.0.0", - "hashPath": "fsharp.core.7.0.0.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", - "path": "microsoft.netcore.platforms/1.1.0", - "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" - }, - "NETStandard.Library/2.0.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "path": "netstandard.library/2.0.3", - "hashPath": "netstandard.library.2.0.3.nupkg.sha512" - }, - "System.Buffers/4.5.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==", - "path": "system.buffers/4.5.1", - "hashPath": "system.buffers.4.5.1.nupkg.sha512" - }, - "System.Collections.Immutable/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==", - "path": "system.collections.immutable/6.0.0", - "hashPath": "system.collections.immutable.6.0.0.nupkg.sha512" - }, - "System.Diagnostics.DiagnosticSource/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", - "path": "system.diagnostics.diagnosticsource/6.0.0", - "hashPath": "system.diagnostics.diagnosticsource.6.0.0.nupkg.sha512" - }, - "System.Memory/4.5.5": { - "type": "package", - "serviceable": true, - "sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", - "path": "system.memory/4.5.5", - "hashPath": "system.memory.4.5.5.nupkg.sha512" - }, - "System.Numerics.Vectors/4.4.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==", - "path": "system.numerics.vectors/4.4.0", - "hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512" - }, - "System.Reflection.Emit/4.7.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==", - "path": "system.reflection.emit/4.7.0", - "hashPath": "system.reflection.emit.4.7.0.nupkg.sha512" - }, - "System.Reflection.Emit.ILGeneration/4.7.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-AucBYo3DSI0IDxdUjKksBcQJXPHyoPyrCXYURW1WDsLI4M65Ar/goSHjdnHOAY9MiYDNKqDlIgaYm+zL2hA1KA==", - "path": "system.reflection.emit.ilgeneration/4.7.0", - "hashPath": "system.reflection.emit.ilgeneration.4.7.0.nupkg.sha512" - }, - "System.Reflection.Metadata/6.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-III/lNMSn0ZRBuM9m5Cgbiho5j81u0FAEagFX5ta2DKbljZ3T0IpD8j+BIiHQPeKqJppWS9bGEp6JnKnWKze0g==", - "path": "system.reflection.metadata/6.0.1", - "hashPath": "system.reflection.metadata.6.0.1.nupkg.sha512" - }, - "System.Runtime.CompilerServices.Unsafe/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==", - "path": "system.runtime.compilerservices.unsafe/6.0.0", - "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" - }, - "FSharp.DependencyManager.Nuget/8.0.100": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.dll b/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.dll deleted file mode 100644 index 70921dd62d..0000000000 Binary files a/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.dll and /dev/null differ diff --git a/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.xml b/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.xml deleted file mode 100644 index 327c660f7b..0000000000 --- a/lib/fcs/nojaf/Debug/FSharp.Compiler.Service.xml +++ /dev/null @@ -1,38983 +0,0 @@ - - -FSharp.Compiler.Service - - - - Consider using 'yield!' instead of 'yield'. - (Originally from FSComp.txt:38) - - - - - This XML comment is invalid: unresolved cross-reference '%s' - (Originally from FSComp.txt:1642) - - - - - This XML comment is invalid: missing 'name' attribute for parameter or parameter reference - (Originally from FSComp.txt:1638) - - - - - This XML comment is incomplete: no documentation for parameter '%s' - (Originally from FSComp.txt:1643) - - - - - This XML comment is invalid: missing 'cref' attribute for cross-reference - (Originally from FSComp.txt:1639) - - - - - This XML comment is invalid: unknown parameter '%s' - (Originally from FSComp.txt:1640) - - - - - This XML comment is invalid: multiple documentation entries for parameter '%s' - (Originally from FSComp.txt:1641) - - - - - This XML comment is invalid: '%s' - (Originally from FSComp.txt:1637) - - - - - The byref pointer is readonly, so this write is not permitted. - (Originally from FSComp.txt:1499) - - - - - The value '%s' is not accessible from this code location - (Originally from FSComp.txt:974) - - - - - Use reference assemblies for .NET framework references when available (Enabled by default). - (Originally from FSComp.txt:1537) - - - - - This attribute is currently unsupported by the F# compiler. Applying it will not achieve its intended effect. - (Originally from FSComp.txt:42) - - - - - The union cases or fields of the type '%s' are not accessible from this code location - (Originally from FSComp.txt:973) - - - - - The union case '%s' is not accessible from this code location - (Originally from FSComp.txt:975) - - - - - The value or constructor '%s' is not defined. - (Originally from FSComp.txt:10) - - - - - The value, namespace, type or module '%s' is not defined. - (Originally from FSComp.txt:11) - - - - - The value, constructor, namespace or type '%s' is not defined. - (Originally from FSComp.txt:9) - - - - - The type parameter %s is not defined. - (Originally from FSComp.txt:18) - - - - - The type '%s' is not defined in '%s'. - (Originally from FSComp.txt:14) - - - - - The type '%s' is not defined. - (Originally from FSComp.txt:13) - - - - - Maybe you want one of the following: - (Originally from FSComp.txt:17) - - - - - The record label or namespace '%s' is not defined. - (Originally from FSComp.txt:15) - - - - - The record label '%s' is not defined. - (Originally from FSComp.txt:16) - - - - - The pattern discriminator '%s' is not defined. - (Originally from FSComp.txt:19) - - - - - The namespace or module '%s' is not defined. - (Originally from FSComp.txt:6) - - - - - The namespace '%s' is not defined. - (Originally from FSComp.txt:5) - - - - - The type '%s' does not define the field, constructor or member '%s'. - (Originally from FSComp.txt:8) - - - - - The field, constructor or member '%s' is not defined. - (Originally from FSComp.txt:7) - - - - - The constructor, module or namespace '%s' is not defined. - (Originally from FSComp.txt:12) - - - - - The type '%s' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' - (Originally from FSComp.txt:180) - - - - - The type '%s' 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 - (Originally from FSComp.txt:181) - - - - - The signature and implementation are not compatible because the respective type parameter counts differ - (Originally from FSComp.txt:176) - - - - - The signature and implementation are not compatible because the type parameter '%s' has a constraint of the form %s but the implementation does not. Either remove this constraint from the signature or add it to the implementation. - (Originally from FSComp.txt:179) - - - - - The signature and implementation are not compatible because the declaration of the type parameter '%s' requires a constraint of the form %s - (Originally from FSComp.txt:178) - - - - - 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 - (Originally from FSComp.txt:177) - - - - - The override for '%s' was ambiguous - (Originally from FSComp.txt:196) - - - - - The override '%s' implements more than one abstract slot, e.g. '%s' and '%s' - (Originally from FSComp.txt:199) - - - - - No implementations of '%s' had the correct number of arguments and type parameters. The required signature is '%s'. - (Originally from FSComp.txt:195) - - - - - No implementation was given for '%s'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. - (Originally from FSComp.txt:206) - - - - - No implementation was given for those members: %sNote that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. - (Originally from FSComp.txt:207) - - - - - No implementation was given for those members (some results omitted): %sNote that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. - (Originally from FSComp.txt:208) - - - - - No implementation was given for those members (some results omitted): %s - (Originally from FSComp.txt:205) - - - - - No implementation was given for those members: %s - (Originally from FSComp.txt:204) - - - - - No implementation was given for '%s' - (Originally from FSComp.txt:203) - - - - - A type has been implicitly inferred as 'obj', which may be unintended. Consider adding explicit type annotations. You can disable this warning by using '#nowarn \"3559\"' or '--nowarn:3559'. - (Originally from FSComp.txt:1703) - - - - - The interface '%s' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. - (Originally from FSComp.txt:201) - - - - - The named argument '%s' has been assigned more than one value - (Originally from FSComp.txt:202) - - - - - More than one override implements '%s' - (Originally from FSComp.txt:197) - - - - - The namespace or module attributes differ between signature and implementation - (Originally from FSComp.txt:193) - - - - - The method '%s' is sealed and cannot be overridden - (Originally from FSComp.txt:198) - - - - - This method is over-constrained in its type parameters - (Originally from FSComp.txt:194) - - - - - The member '%s' matches multiple overloads of the same method.\nPlease restrict it to one of the following:%s. - (Originally from FSComp.txt:1392) - - - - - The member '%s' does not have the correct number of method type parameters. The required signature is '%s'. - (Originally from FSComp.txt:210) - - - - - The member '%s' does not have the correct number of arguments. The required signature is '%s'. - (Originally from FSComp.txt:209) - - - - - The member '%s' does not have the correct kinds of generic parameters. The required signature is '%s'. - (Originally from FSComp.txt:211) - - - - - The member '%s' cannot be used to implement '%s'. The required signature is '%s'. - (Originally from FSComp.txt:212) - - - - - Invalid value - (Originally from FSComp.txt:175) - - - - - You cannot implement the interface '%s' with the two instantiations '%s' and '%s' because they may unify. - (Originally from FSComp.txt:1596) - - - - - '%s' cannot implement the interface '%s' with the two instantiations '%s' and '%s' because they may unify. - (Originally from FSComp.txt:1595) - - - - - Interface member '%s' does not have a most specific implementation. - (Originally from FSComp.txt:1535) - - - - - The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type - (Originally from FSComp.txt:182) - - - - - The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' - (Originally from FSComp.txt:183) - - - - - The struct, record or union type '%s' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' - (Originally from FSComp.txt:184) - - - - - Duplicate or redundant interface - (Originally from FSComp.txt:200) - - - - - 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 - (Originally from FSComp.txt:171) - - - - - Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position - (Originally from FSComp.txt:1086) - - - - - Could not resolve the ambiguity inherent in the use of a 'printf'-style format string - (Originally from FSComp.txt:172) - - - - - Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position - (Originally from FSComp.txt:173) - - - - - Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position - (Originally from FSComp.txt:174) - - - - - The type '%s' is not accessible from this code location - (Originally from FSComp.txt:972) - - - - - union case - (Originally from FSComp.txt:950) - - - - - property - (Originally from FSComp.txt:955) - - - - - patvar - (Originally from FSComp.txt:960) - - - - - and %d other overloads - (Originally from FSComp.txt:949) - - - - - namespace/module - (Originally from FSComp.txt:963) - - - - - namespace - (Originally from FSComp.txt:961) - - - - - module - (Originally from FSComp.txt:962) - - - - - generated type - (Originally from FSComp.txt:967) - - - - - generated property - (Originally from FSComp.txt:966) - - - - - Full name - (Originally from FSComp.txt:945) - - - - - also from %s - (Originally from FSComp.txt:965) - - - - - from %s - (Originally from FSComp.txt:964) - - - - - field - (Originally from FSComp.txt:953) - - - - - extension - (Originally from FSComp.txt:956) - - - - - event - (Originally from FSComp.txt:954) - - - - - custom operation - (Originally from FSComp.txt:957) - - - - - Calls - (Originally from FSComp.txt:1296) - - - - - argument - (Originally from FSComp.txt:958) - - - - - anonymous record field - (Originally from FSComp.txt:959) - - - - - active recognizer - (Originally from FSComp.txt:952) - - - - - active pattern result - (Originally from FSComp.txt:951) - - - - - \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. - (Originally from FSComp.txt:39) - - - - - The specified .NET Framework version '%s' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. - (Originally from FSComp.txt:1134) - - - - - Unexpected Expr.TyChoose - (Originally from FSComp.txt:982) - - - - - 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. - (Originally from FSComp.txt:983) - - - - - The 'VolatileField' attribute may only be used on 'let' bindings in classes - (Originally from FSComp.txt:677) - - - - - Volatile fields must be marked 'mutable' and cannot be thread-static - (Originally from FSComp.txt:732) - - - - - A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute - (Originally from FSComp.txt:730) - - - - - Declaring \"interfaces with static abstract methods\" is an advanced feature. See https://aka.ms/fsharp-iwsams for guidance. You can disable this warning by using '#nowarn \"3535\"' or '--nowarn:3535'. - (Originally from FSComp.txt:1685) - - - - - '%s' is normally used as a type constraint in generic code, e.g. \"'T when ISomeInterface<'T>\" or \"let f (x: #ISomeInterface<_>)\". See https://aka.ms/fsharp-iwsams for guidance. You can disable this warning by using '#nowarn \"3536\"' or '--nowarn:3536'. - (Originally from FSComp.txt:1686) - - - - - In sequence expressions, multiple results are generated using 'yield!' - (Originally from FSComp.txt:652) - - - - - 'use' expressions may not be used in queries - (Originally from FSComp.txt:1313) - - - - - The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. - (Originally from FSComp.txt:650) - - - - - This declaration is not supported in recursive declaration groups - (Originally from FSComp.txt:1382) - - - - - This attribute cannot be used in this version of F# - (Originally from FSComp.txt:704) - - - - - This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. - (Originally from FSComp.txt:1316) - - - - - Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' - (Originally from FSComp.txt:1324) - - - - - Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. - (Originally from FSComp.txt:694) - - - - - The unnamed arguments do not form a prefix of the arguments of the method called - (Originally from FSComp.txt:671) - - - - - Unknown union case - (Originally from FSComp.txt:525) - - - - - Unit-of-measure cannot be used in type constructor application - (Originally from FSComp.txt:562) - - - - - This union case takes one argument - (Originally from FSComp.txt:580) - - - - - The union case named '%s' conflicts with the generated type '%s' - (Originally from FSComp.txt:1110) - - - - - Union case/exception field '%s' cannot be used more than once. - (Originally from FSComp.txt:1351) - - - - - This union case expects %d arguments in tupled form, but was given %d. The missing field arguments may be any of:%s - (Originally from FSComp.txt:581) - - - - - This union case does not take arguments - (Originally from FSComp.txt:579) - - - - - The union case '%s' does not have a field named '%s'. - (Originally from FSComp.txt:1347) - - - - - Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. - (Originally from FSComp.txt:733) - - - - - Unexpected type arguments - (Originally from FSComp.txt:571) - - - - - Unexpected %s in type expression - (Originally from FSComp.txt:565) - - - - - Unexpected / in type - (Originally from FSComp.txt:570) - - - - - Unexpected source-level property specification - (Originally from FSComp.txt:536) - - - - - Unexpected source-level property specification in syntax tree - (Originally from FSComp.txt:530) - - - - - Unexpected SynMeasure.Anon - (Originally from FSComp.txt:487) - - - - - Unexpected function type in union case field definition. If you intend the field to be a function, consider wrapping the function signature with parens, e.g. | Case of a -> b into | Case of (a -> b). - (Originally from FSComp.txt:1726) - - - - - Unexpected expression at recursive inference point - (Originally from FSComp.txt:515) - - - - - Unexpected Const_uint16array - (Originally from FSComp.txt:492) - - - - - Unexpected Const_bytearray - (Originally from FSComp.txt:493) - - - - - Unexpected condition in imported assembly: failed to decode AttributeUsage attribute - (Originally from FSComp.txt:693) - - - - - Unexpected big rational constant - (Originally from FSComp.txt:490) - - - - - The field '%s' has been given a value, but is not present in the type '%s' - (Originally from FSComp.txt:617) - - - - - Invalid interpolated string. %s - (Originally from FSComp.txt:1622) - - - - - Unable to parse format string '%s' - (Originally from FSComp.txt:595) - - - - - Types cannot inherit from multiple concrete types - (Originally from FSComp.txt:782) - - - - - Types cannot contain nested type definitions - (Originally from FSComp.txt:763) - - - - - Struct types are always sealed - (Originally from FSComp.txt:794) - - - - - Record types are always sealed - (Originally from FSComp.txt:792) - - - - - Enum types are always sealed - (Originally from FSComp.txt:796) - - - - - Delegate types are always sealed - (Originally from FSComp.txt:795) - - - - - Discriminated union types are always sealed - (Originally from FSComp.txt:791) - - - - - Assembly code types are always sealed - (Originally from FSComp.txt:793) - - - - - 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. - (Originally from FSComp.txt:818) - - - - - This type test or downcast will erase the provided type '%s' to the type '%s' - (Originally from FSComp.txt:1224) - - - - - This type test or downcast will ignore the unit-of-measure '%s' - (Originally from FSComp.txt:1121) - - - - - This type test with a provided type '%s' is not allowed because this provided type will be erased to '%s' at runtime. - (Originally from FSComp.txt:1226) - - - - - This type requires a definition - (Originally from FSComp.txt:779) - - - - - 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). - (Originally from FSComp.txt:520) - - - - - Type parameter cannot be used as type constructor - (Originally from FSComp.txt:566) - - - - - This type parameter has been used in a way that constrains it to always be '%s' - (Originally from FSComp.txt:519) - - - - - This value, type or method expects %d type parameter(s) but was given %d - (Originally from FSComp.txt:542) - - - - - type or module - (Originally from FSComp.txt:765) - - - - - The type '%s' is not an interface type - (Originally from FSComp.txt:740) - - - - - This type is not an interface type - (Originally from FSComp.txt:758) - - - - - This type is not a record type. Values of class and struct types must be created using calls to object constructors. - (Originally from FSComp.txt:645) - - - - - This type is not a record type - (Originally from FSComp.txt:646) - - - - - This type is not accessible from this code location - (Originally from FSComp.txt:692) - - - - - This type has no nested types - (Originally from FSComp.txt:564) - - - - - This type has no accessible object constructors - (Originally from FSComp.txt:655) - - - - - type, exception or module - (Originally from FSComp.txt:764) - - - - - This type does not inherit Attribute, it will not work correctly with other .NET languages. - (Originally from FSComp.txt:1515) - - - - - Type definitions may only have one 'inherit' specification and it must be the first declaration - (Originally from FSComp.txt:811) - - - - - 'let' and 'do' bindings must come before member and interface definitions in type definitions - (Originally from FSComp.txt:812) - - - - - This type definition involves an immediate cyclic reference through a struct field or inheritance relation - (Originally from FSComp.txt:807) - - - - - This type definition involves an immediate cyclic reference through an abbreviation - (Originally from FSComp.txt:806) - - - - - This downcast will erase the provided type '%s' to the type '%s'. - (Originally from FSComp.txt:1225) - - - - - The type '%s' 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 - (Originally from FSComp.txt:549) - - - - - Type abbreviations cannot have members - (Originally from FSComp.txt:747) - - - - - As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. - (Originally from FSComp.txt:748) - - - - - Type abbreviations cannot have interface declarations - (Originally from FSComp.txt:756) - - - - - Type abbreviations cannot have augmentations - (Originally from FSComp.txt:816) - - - - - 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 ...'. - (Originally from FSComp.txt:780) - - - - - One tuple type is a struct tuple, the other is a reference tuple - (Originally from FSComp.txt:1375) - - - - - This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. - (Originally from FSComp.txt:1495) - - - - - 'try/with' expressions may not be used in queries - (Originally from FSComp.txt:1317) - - - - - 'try'/'with' cannot be used within sequence expressions - (Originally from FSComp.txt:651) - - - - - A trait may not specify optional, in, out, ParamArray, CallerInfo or Quote arguments - (Originally from FSComp.txt:1682) - - - - - Trait '%s' is static - (Originally from FSComp.txt:1680) - - - - - Trait '%s' is not static - (Originally from FSComp.txt:1681) - - - - - Invocation of a static constraint should use \"'T.Ident\" and not \"^T.Ident\", even for statically resolved type parameters. - (Originally from FSComp.txt:1684) - - - - - The trait '%s' invoked by this call has multiple support types. This invocation syntax is not permitted for such traits. See https://aka.ms/fsharp-srtp for guidance. - (Originally from FSComp.txt:1687) - - - - - Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread - (Originally from FSComp.txt:731) - - - - - This member, function or value declaration may not be declared 'inline' - (Originally from FSComp.txt:1322) - - - - - This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. - (Originally from FSComp.txt:1304) - - - - - Invalid provided field. Provided fields of erased provided types must be literals. - (Originally from FSComp.txt:1333) - - - - - The syntax 'expr.id' may only be used with record labels, properties and fields - (Originally from FSComp.txt:666) - - - - - Syntax error - unexpected '?' symbol - (Originally from FSComp.txt:587) - - - - - '%s' may only be used to construct object types - (Originally from FSComp.txt:615) - - - - - SynType.Or is not permitted in this declaration - (Originally from FSComp.txt:1692) - - - - - This expression implicitly converts type '%s' to type '%s'. See https://aka.ms/fsharp-implicit-convs. - (Originally from FSComp.txt:1635) - - - - - The struct, record or union type '%s' has the 'StructuralEquality' attribute but the component type '%s' does not satisfy the 'equality' constraint - (Originally from FSComp.txt:1066) - - - - - The struct, record or union type '%s' has the 'StructuralEquality' attribute but the type parameter '%s' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter - (Originally from FSComp.txt:1065) - - - - - The struct, record or union type '%s' has the 'StructuralComparison' attribute but the component type '%s' does not satisfy the 'comparison' constraint - (Originally from FSComp.txt:1060) - - - - - The struct, record or union type '%s' has the 'StructuralComparison' attribute but the type parameter '%s' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter - (Originally from FSComp.txt:1059) - - - - - Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. - (Originally from FSComp.txt:1067) - - - - - Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. - (Originally from FSComp.txt:752) - - - - - Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings - (Originally from FSComp.txt:751) - - - - - Structs, interfaces, enums and delegates cannot inherit from other types - (Originally from FSComp.txt:781) - - - - - Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. - (Originally from FSComp.txt:723) - - - - - Structs may only bind a 'this' parameter at member declarations - (Originally from FSComp.txt:514) - - - - - If a multicase union type is a struct, then all union cases must have unique names. For example: 'type A = B of b: int | C of c: int'. - (Originally from FSComp.txt:1384) - - - - - Struct types cannot contain abstract members - (Originally from FSComp.txt:801) - - - - - Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. - (Originally from FSComp.txt:734) - - - - - Static optimization conditionals are only for use within the F# library - (Originally from FSComp.txt:672) - - - - - This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. - (Originally from FSComp.txt:533) - - - - - For F#7 and lower, static value definitions may only be used in types with a primary constructor ('type X(args) = ...'). To enable them in all other types, use language version 'preview'. - (Originally from FSComp.txt:753) - - - - - Interfaces cannot contain definitions of static initializers - (Originally from FSComp.txt:718) - - - - - A static initializer requires an argument - (Originally from FSComp.txt:531) - - - - - A static field was used where an instance field is expected - (Originally from FSComp.txt:484) - - - - - Static bindings cannot be added to extrinsic augmentations. Consider using a 'static member' instead. - (Originally from FSComp.txt:1720) - - - - - A simple method name is required here - (Originally from FSComp.txt:625) - - - - - Cannot call '%s' - a setter for init-only property, please use object initialization instead. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization - (Originally from FSComp.txt:664) - - - - - In sequence expressions, results are generated using 'yield' - (Originally from FSComp.txt:489) - - - - - Array method '%s' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. - (Originally from FSComp.txt:1346) - - - - - Return values cannot have names - (Originally from FSComp.txt:495) - - - - - Return types of union cases must be identical to the type being defined, up to abbreviations - (Originally from FSComp.txt:738) - - - - - 'return' and 'return!' may not be used in queries - (Originally from FSComp.txt:1315) - - - - - Using resumable code or resumable state machines requires /langversion:preview - (Originally from FSComp.txt:1656) - - - - - Resumable code invocation. Suppress this warning if you are defining new low-level resumable code in terms of existing resumable code. - (Originally from FSComp.txt:1660) - - - - - Invalid resumable code. Any method of function accepting or returning resumable code must be marked 'inline' - (Originally from FSComp.txt:1652) - - - - - Invalid resumable code. A 'let rec' occured in the resumable code specification - (Originally from FSComp.txt:1655) - - - - - Invalid resumable code. Resumable code parameter must have name beginning with '__expand' - (Originally from FSComp.txt:1653) - - - - - Invalid resumable code. A resumable code parameter must be of delegate or function type - (Originally from FSComp.txt:1654) - - - - - 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 '[<Sealed>] attribute to the type definition in the signature - (Originally from FSComp.txt:808) - - - - - This is not a variable, constant, active recognizer or literal - (Originally from FSComp.txt:584) - - - - - The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '%s' method or appropriate 'MergeSources' and 'Bind' methods - (Originally from FSComp.txt:1529) - - - - - This control construct may only be used if the computation expression builder defines a '%s' method - (Originally from FSComp.txt:563) - - - - - Only active patterns returning exactly one result may accept arguments - (Originally from FSComp.txt:576) - - - - - The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. - (Originally from FSComp.txt:787) - - - - - Recursive bindings that include member specifications can only occur as a direct augmentation of a type - (Originally from FSComp.txt:725) - - - - - Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute - (Originally from FSComp.txt:783) - - - - - This record contains fields from inconsistent types - (Originally from FSComp.txt:512) - - - - - The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored - (Originally from FSComp.txt:1379) - - - - - A property cannot have explicit type parameters. Consider using a method instead. - (Originally from FSComp.txt:527) - - - - - This property or field was not found on this custom attribute type - (Originally from FSComp.txt:699) - - - - - Property '%s' is static - (Originally from FSComp.txt:661) - - - - - Property '%s' is not static - (Originally from FSComp.txt:658) - - - - - Property '%s' is not readable - (Originally from FSComp.txt:659) - - - - - Property '%s' cannot be set - (Originally from FSComp.txt:662) - - - - - This property cannot be set - (Originally from FSComp.txt:698) - - - - - The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class - (Originally from FSComp.txt:626) - - - - - The syntax '(expr1)[expr2]' is now reserved for indexing and is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction (expr1) [expr2]'. - (Originally from FSComp.txt:1604) - - - - - The syntax '(expr1)[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use '(expr1).[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction (expr1) [expr2]'. - (Originally from FSComp.txt:1607) - - - - - A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' - (Originally from FSComp.txt:494) - - - - - The parameter '%s' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. - (Originally from FSComp.txt:1082) - - - - - You must explicitly declare either all or no type parameters when overriding a generic abstract method - (Originally from FSComp.txt:522) - - - - - Accessibility modifiers are not permitted on overrides or interface implementations - (Originally from FSComp.txt:790) - - - - - This override takes a tuple instead of multiple arguments. Try to add an additional layer of parentheses at the method definition (e.g. 'member _.Foo((x, y))'), or remove parentheses at the abstract method declaration (e.g. 'abstract member Foo: 'a * 'b -> 'c'). - (Originally from FSComp.txt:1722) - - - - - This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:%s - (Originally from FSComp.txt:710) - - - - - One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. - (Originally from FSComp.txt:670) - - - - - The syntax 'expr1[expr2]' is now reserved for indexing and is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. - (Originally from FSComp.txt:1606) - - - - - The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. - (Originally from FSComp.txt:1609) - - - - - Optional arguments cannot be used in custom attributes - (Originally from FSComp.txt:697) - - - - - Optional arguments are only permitted on type members - (Originally from FSComp.txt:572) - - - - - Optional arguments must come at the end of the argument list, after any non-optional arguments - (Originally from FSComp.txt:1107) - - - - - '%s' must be followed by 'in'. Usage: %s. - (Originally from FSComp.txt:1340) - - - - - Incorrect syntax for '%s'. Usage: %s. - (Originally from FSComp.txt:1268) - - - - - The operator '%s' does not accept the use of 'into' - (Originally from FSComp.txt:1302) - - - - - This declaration opens the namespace or module '%s' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. - (Originally from FSComp.txt:745) - - - - - In a recursive declaration group, 'open' declarations must come first in each module - (Originally from FSComp.txt:1380) - - - - - Only types representing units-of-measure may be given the 'Measure' attribute - (Originally from FSComp.txt:789) - - - - - Only structs and classes without primary constructors may be given the 'StructLayout' attribute - (Originally from FSComp.txt:786) - - - - - Only simple variable patterns can be bound in 'let rec' constructs - (Originally from FSComp.txt:726) - - - - - Only simple bindings of the form 'id = expr' can be used in construction expressions - (Originally from FSComp.txt:632) - - - - - Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces - (Originally from FSComp.txt:727) - - - - - Only functions may be marked 'inline' - (Originally from FSComp.txt:686) - - - - - Only classes may be given the 'AbstractClass' attribute - (Originally from FSComp.txt:788) - - - - - Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field - (Originally from FSComp.txt:633) - - - - - The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints - (Originally from FSComp.txt:606) - - - - - Only overrides of abstract and virtual members may be specified in object expressions - (Originally from FSComp.txt:620) - - - - - This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. - (Originally from FSComp.txt:537) - - - - - Calls to object constructors on type parameters cannot be given arguments - (Originally from FSComp.txt:608) - - - - - Interfaces cannot contain definitions of object constructors - (Originally from FSComp.txt:719) - - - - - An object constructor requires an argument - (Originally from FSComp.txt:532) - - - - - 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 - (Originally from FSComp.txt:643) - - - - - Object construction expressions may only be used to implement constructors in class types - (Originally from FSComp.txt:631) - - - - - This numeric literal requires that a module '%s' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope - (Originally from FSComp.txt:639) - - - - - This is not a valid name for an enumeration case - (Originally from FSComp.txt:599) - - - - - This code is not sufficiently generic. The type variable %s could not be generalized because it would escape its scope. - (Originally from FSComp.txt:526) - - - - - The value '%s' is not a function and does not support index notation. - (Originally from FSComp.txt:1593) - - - - - This expression is not a function and does not support index notation. - (Originally from FSComp.txt:1594) - - - - - Not an exception - (Originally from FSComp.txt:773) - - - - - This value supports indexing, e.g. '%s.[index]'. The syntax '%s[index]' requires /langversion:preview. See https://aka.ms/fsharp-index-notation. - (Originally from FSComp.txt:1591) - - - - - This expression supports indexing, e.g. 'expr.[index]'. The syntax 'expr[index]' requires /langversion:preview. See https://aka.ms/fsharp-index-notation. - (Originally from FSComp.txt:1592) - - - - - Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. - (Originally from FSComp.txt:488) - - - - - The generic member '%s' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. - (Originally from FSComp.txt:1083) - - - - - This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. - (Originally from FSComp.txt:1318) - - - - - This value is not a literal and cannot be used in a pattern - (Originally from FSComp.txt:545) - - - - - 'while' expressions may not be used in queries - (Originally from FSComp.txt:1311) - - - - - 'try/finally' expressions may not be used in queries - (Originally from FSComp.txt:1312) - - - - - No abstract property was found that corresponds to this override - (Originally from FSComp.txt:713) - - - - - No abstract or interface member was found that corresponds to this override - (Originally from FSComp.txt:709) - - - - - Interface implementations cannot be given on construction expressions - (Originally from FSComp.txt:630) - - - - - In queries, use the form 'for x in n .. m do ...' for ranging over integers - (Originally from FSComp.txt:1310) - - - - - The struct, record or union type '%s' does not support structural equality because the type '%s' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '%s' to clarify that the type does not support structural equality - (Originally from FSComp.txt:1064) - - - - - The struct, record or union type '%s' does not support structural equality because the type parameter %s does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '%s' to clarify that the type does not support structural equality - (Originally from FSComp.txt:1063) - - - - - Using methods with 'NoEagerConstraintApplicationAttribute' requires /langversion:6.0 or later - (Originally from FSComp.txt:1657) - - - - - The struct, record or union type '%s' is not structurally comparable because the type '%s' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '%s' to clarify that the type is not comparable - (Originally from FSComp.txt:1062) - - - - - The struct, record or union type '%s' is not structurally comparable because the type parameter %s does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '%s' to clarify that the type is not comparable - (Originally from FSComp.txt:1061) - - - - - No arguments may be given when constructing a record value - (Originally from FSComp.txt:629) - - - - - The member '%s' does not correspond to any abstract or virtual method available to override or implement. - (Originally from FSComp.txt:621) - - - - - 'new' may only be used with object constructors - (Originally from FSComp.txt:637) - - - - - 'new' must be used with a named type - (Originally from FSComp.txt:627) - - - - - This new member hides the abstract member '%s' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. - (Originally from FSComp.txt:717) - - - - - This new member hides the abstract member '%s'. Rename the member or use 'override' instead. - (Originally from FSComp.txt:716) - - - - - 'new' cannot be used on interface types. Consider using an object expression '{ new ... with ... }' instead. - (Originally from FSComp.txt:612) - - - - - Namespaces cannot contain values. Consider using a module to hold your value declarations. - (Originally from FSComp.txt:41) - - - - - Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. - (Originally from FSComp.txt:497) - - - - - '%s' may only be used with named types - (Originally from FSComp.txt:610) - - - - - Named arguments cannot be given to member trait calls - (Originally from FSComp.txt:598) - - - - - The named argument '%s' did not match any argument or mutable property - (Originally from FSComp.txt:669) - - - - - %s is an active pattern and cannot be treated as a discriminated union case with named fields. - (Originally from FSComp.txt:1389) - - - - - Name '%s' not bound in pattern context - (Originally from FSComp.txt:573) - - - - - Named arguments must appear after all other arguments - (Originally from FSComp.txt:547) - - - - - Mutable function values should be written 'let mutable f = (fun args -> ...)' - (Originally from FSComp.txt:685) - - - - - Mutable values cannot have generic parameters - (Originally from FSComp.txt:684) - - - - - Mutable values cannot be marked 'inline' - (Originally from FSComp.txt:683) - - - - - Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. - (Originally from FSComp.txt:499) - - - - - Multiple visibility attributes have been specified for this identifier - (Originally from FSComp.txt:498) - - - - - Multiple type matches were found:\n%s\nThe type '%s' was used. Due to the overlapping field names\n%s\nconsider using type annotations or change the order of open statements. - (Originally from FSComp.txt:1712) - - - - - The field '%s' appears multiple times in this record expression or pattern - (Originally from FSComp.txt:524) - - - - - This declaration opens the module '%s', which is marked as 'RequireQualifiedAccess'. 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. - (Originally from FSComp.txt:744) - - - - - The path '%s' is a namespace. A module abbreviation may not abbreviate a namespace. - (Originally from FSComp.txt:817) - - - - - In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations - (Originally from FSComp.txt:1381) - - - - - The following required properties have to be initalized:%s - (Originally from FSComp.txt:1688) - - - - - A custom query operation for '%s' is required but not specified - (Originally from FSComp.txt:1238) - - - - - Method overrides and interface implementations are not permitted here - (Originally from FSComp.txt:708) - - - - - Method '%s' is not accessible from this code location - (Originally from FSComp.txt:485) - - - - - 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 client code to bring the extension members into scope. - (Originally from FSComp.txt:809) - - - - - 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. - (Originally from FSComp.txt:819) - - - - - Interfaces cannot contain definitions of member overrides - (Originally from FSComp.txt:720) - - - - - Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. - (Originally from FSComp.txt:1109) - - - - - This member is not permitted in an interface implementation - (Originally from FSComp.txt:761) - - - - - SynMemberKind.PropertyGetSet only expected in parse trees - (Originally from FSComp.txt:496) - - - - - This member is not sufficiently generic - (Originally from FSComp.txt:728) - - - - - The type %s contains the member '%s' but it is not a virtual or abstract method that is available to override or implement. - (Originally from FSComp.txt:622) - - - - - A member and a local class binding both have the name '%s' - (Originally from FSComp.txt:755) - - - - - Measure definitions cannot have type parameters - (Originally from FSComp.txt:778) - - - - - Measure declarations may have only static members: constructors are not available - (Originally from FSComp.txt:754) - - - - - Measure declarations may have only static members - (Originally from FSComp.txt:750) - - - - - 'match' expressions may not be used in queries - (Originally from FSComp.txt:1337) - - - - - This lookup cannot be used here - (Originally from FSComp.txt:660) - - - - - Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. - (Originally from FSComp.txt:746) - - - - - Cannot assign '%s' to a value marked literal - (Originally from FSComp.txt:1598) - - - - - Cannot assign a value to another value marked literal - (Originally from FSComp.txt:1599) - - - - - This literal pattern does not take arguments - (Originally from FSComp.txt:1369) - - - - - Literal values cannot have generic parameters - (Originally from FSComp.txt:690) - - - - - A literal value cannot be marked 'mutable' - (Originally from FSComp.txt:688) - - - - - A literal value cannot be marked 'inline' - (Originally from FSComp.txt:689) - - - - - A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x: int = 1' - (Originally from FSComp.txt:729) - - - - - A [<Literal>] declaration cannot use an active pattern for its identifier - (Originally from FSComp.txt:1649) - - - - - The syntax '[expr1][expr2]' is now reserved for indexing and is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction [expr1] [expr2]'. - (Originally from FSComp.txt:1605) - - - - - The syntax '[expr1][expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use '(expr1).[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction [expr1] [expr2]'. - (Originally from FSComp.txt:1608) - - - - - This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. - (Originally from FSComp.txt:596) - - - - - This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - (Originally from FSComp.txt:815) - - - - - This code is less generic than required by its annotations because the explicit type variable '%s' could not be generalized. It was constrained to be '%s'. - (Originally from FSComp.txt:516) - - - - - The kind of the type specified by its attributes does not match the kind implied by its definition - (Originally from FSComp.txt:777) - - - - - In queries, '%s' must use a simple pattern - (Originally from FSComp.txt:1237) - - - - - A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. - (Originally from FSComp.txt:1506) - - - - - Invalid use of a type name - (Originally from FSComp.txt:654) - - - - - Invalid use of reverse index in list expression. - (Originally from FSComp.txt:1600) - - - - - Invalid use of an interface type - (Originally from FSComp.txt:656) - - - - - Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. - (Originally from FSComp.txt:657) - - - - - The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case - (Originally from FSComp.txt:1081) - - - - - 'use' bindings must be of the form 'use <var> = <expr>' - (Originally from FSComp.txt:706) - - - - - use! may not be combined with and! - (Originally from FSComp.txt:1531) - - - - - 'use!' bindings must be of the form 'use! <var> = <expr>' - (Originally from FSComp.txt:1116) - - - - - Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. - (Originally from FSComp.txt:561) - - - - - Units-of-measure are only supported on float, float32, decimal, and integer types. - (Originally from FSComp.txt:491) - - - - - Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char - (Originally from FSComp.txt:805) - - - - - Invalid type extension - (Originally from FSComp.txt:775) - - - - - Type arguments cannot be specified here - (Originally from FSComp.txt:575) - - - - - The number of type arguments did not match: '%d' given, '%d' expected. This may be related to a previously reported error. - (Originally from FSComp.txt:1231) - - - - - The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions - (Originally from FSComp.txt:1633) - - - - - Invalid signature for set member - (Originally from FSComp.txt:715) - - - - - Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }' - (Originally from FSComp.txt:593) - - - - - Invalid constraint. Valid constraint forms include \"'T :> ISomeInterface\" for interface constraints and \"SomeConstrainingType<'T>\" for self-constraints. See https://aka.ms/fsharp-type-constraints. - (Originally from FSComp.txt:1683) - - - - - The construct '%s' may only be used in valid resumable code. - (Originally from FSComp.txt:1651) - - - - - Invalid join relation in '%s'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. - (Originally from FSComp.txt:1295) - - - - - Invalid record construction - (Originally from FSComp.txt:640) - - - - - 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)'. - (Originally from FSComp.txt:556) - - - - - This is not a valid pattern - (Originally from FSComp.txt:585) - - - - - Invalid optional assignment to a property or field - (Originally from FSComp.txt:674) - - - - - 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. - (Originally from FSComp.txt:504) - - - - - 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. - (Originally from FSComp.txt:505) - - - - - The '%s' operator should not normally be redefined. Consider using a different operator name - (Originally from FSComp.txt:506) - - - - - Invalid object, sequence or record expression - (Originally from FSComp.txt:592) - - - - - Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. - (Originally from FSComp.txt:591) - - - - - This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. - (Originally from FSComp.txt:551) - - - - - Non-primitive numeric literal constants cannot 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 <variable> = <constant>' at the end of the match clause. - (Originally from FSComp.txt:574) - - - - - 'new' constraints must take one argument of type 'unit' and return the constructed type - (Originally from FSComp.txt:555) - - - - - Invalid namespace, module, type or union case name - (Originally from FSComp.txt:736) - - - - - Invalid module name - (Originally from FSComp.txt:774) - - - - - This recursive binding uses an invalid mixture of recursive forms - (Originally from FSComp.txt:550) - - - - - 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 CLI languages then use the name '%s' instead. - (Originally from FSComp.txt:500) - - - - - 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 CLI languages then use the name '%s' instead. - (Originally from FSComp.txt:501) - - - - - 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 - (Originally from FSComp.txt:503) - - - - - Invalid member name. Members may not have name '.ctor' or '.cctor' - (Originally from FSComp.txt:1229) - - - - - The name '(%s)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '%s' instead. - (Originally from FSComp.txt:502) - - - - - Invalid member declaration. The name of the member is missing or has parentheses. - (Originally from FSComp.txt:1676) - - - - - Invalid inline specification - (Originally from FSComp.txt:705) - - - - - Incomplete expression or invalid use of indexer syntax - (Originally from FSComp.txt:605) - - - - - The '%s' operator cannot be redefined. Consider using a different operator name - (Originally from FSComp.txt:507) - - - - - Internal error. Invalid index into active pattern array - (Originally from FSComp.txt:578) - - - - - This is not a valid value for an enumeration literal - (Originally from FSComp.txt:739) - - - - - An 'enum' constraint must be of the form 'enum<type>' - (Originally from FSComp.txt:554) - - - - - Delegate specifications must be of the form 'typ -> typ' - (Originally from FSComp.txt:803) - - - - - Invalid declaration - (Originally from FSComp.txt:538) - - - - - Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution - (Originally from FSComp.txt:553) - - - - - Invalid constraint - (Originally from FSComp.txt:552) - - - - - This is not a valid constant expression - (Originally from FSComp.txt:691) - - - - - Invalid assignment - (Originally from FSComp.txt:653) - - - - - Invalid argument to parameterized pattern label - (Originally from FSComp.txt:577) - - - - - Invalid alignment in interpolated string - (Originally from FSComp.txt:1619) - - - - - This is not a valid name for an active pattern - (Originally from FSComp.txt:681) - - - - - A use of 'into' must be followed by the remainder of the computation - (Originally from FSComp.txt:1301) - - - - - Mismatch in interpolated string. Interpolated strings may not use '%%' format specifiers unless each is given an expression, e.g. '%%d{1+1}' - (Originally from FSComp.txt:1618) - - - - - Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' - (Originally from FSComp.txt:1098) - - - - - Interface types cannot be sealed - (Originally from FSComp.txt:802) - - - - - Interface types and delegate types cannot contain fields - (Originally from FSComp.txt:797) - - - - - This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. - (Originally from FSComp.txt:529) - - - - - The 'InlineIfLambda' attribute may only be used on parameters of inlined functions of methods whose type is a function or F# delegate type. - (Originally from FSComp.txt:1674) - - - - - Init-only property '%s' cannot be set outside the initialization code. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization - (Originally from FSComp.txt:663) - - - - - The inherited type is not an object model type - (Originally from FSComp.txt:642) - - - - - A inheritance declaration is not permitted here - (Originally from FSComp.txt:743) - - - - - This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. - (Originally from FSComp.txt:813) - - - - - This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - (Originally from FSComp.txt:814) - - - - - 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. - (Originally from FSComp.txt:611) - - - - - This is a function definition that shadows a union case. If this is what you want, ignore or suppress this warning. If you want it to be a union case deconstruction, add parentheses. - (Originally from FSComp.txt:1727) - - - - - The function or member '%s' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '%s'. - (Originally from FSComp.txt:1230) - - - - - The syntax 'arr.[idx]' is now revised to 'arr[idx]'. Please update your code. - (Originally from FSComp.txt:1602) - - - - - Implicit product of measures following / - (Originally from FSComp.txt:486) - - - - - This expression uses the implicit conversion '%s' to convert type '%s' to type '%s'. See https://aka.ms/fsharp-implicit-convs. This warning may be disabled using '#nowarn \"3391\". - (Originally from FSComp.txt:1644) - - - - - This expression uses the implicit conversion '%s' to convert type '%s' to type '%s'. - (Originally from FSComp.txt:1648) - - - - - The struct, record or union type '%s' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. - (Originally from FSComp.txt:766) - - - - - The struct, record or union type '%s' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. - (Originally from FSComp.txt:511) - - - - - The struct, record or union type '%s' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. - (Originally from FSComp.txt:767) - - - - - The struct, record or union type '%s' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. - (Originally from FSComp.txt:509) - - - - - The struct, record or union type '%s' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. - (Originally from FSComp.txt:510) - - - - - Illegal syntax in type expression - (Originally from FSComp.txt:567) - - - - - This is not valid literal expression. The [<Literal>] attribute will be ignored. - (Originally from FSComp.txt:1355) - - - - - Illegal pattern - (Originally from FSComp.txt:586) - - - - - Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' - (Originally from FSComp.txt:737) - - - - - Byref types are not allowed in an open type declaration. - (Originally from FSComp.txt:1523) - - - - - A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes - (Originally from FSComp.txt:687) - - - - - An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. - (Originally from FSComp.txt:1258) - - - - - It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value - (Originally from FSComp.txt:614) - - - - - The syntax 'expr1[expr2]' is now reserved for indexing. See https://aka.ms/fsharp-index-notation. If calling a function, add a space between the function and argument, e.g. 'someFunction [expr]'. - (Originally from FSComp.txt:1603) - - - - - The syntax 'expr1[expr2]' is used for indexing. Consider adding a type annotation to enable indexing, or if calling a function add a space, e.g. 'expr1 [expr2]'. - (Originally from FSComp.txt:1601) - - - - - The system type '%s' was required but no referenced system DLL contained this type - (Originally from FSComp.txt:1391) - - - - - Generic types cannot be given the 'StructLayout' attribute - (Originally from FSComp.txt:785) - - - - - A generic type parameter has been used in a way that constrains it to always be '%s' - (Originally from FSComp.txt:518) - - - - - The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. - (Originally from FSComp.txt:1344) - - - - - The generic function '%s' must be given explicit type argument(s) - (Originally from FSComp.txt:540) - - - - - 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 %d arguments. - (Originally from FSComp.txt:548) - - - - - The corresponding formal argument is not optional - (Originally from FSComp.txt:673) - - - - - Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is one of the following: an array, the address of an array element, a string, a byref, an inref, or a type implementing GetPinnableReference() - (Originally from FSComp.txt:1386) - - - - - The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type - (Originally from FSComp.txt:523) - - - - - A field/val declaration is not permitted here - (Originally from FSComp.txt:742) - - - - - This field requires a name - (Originally from FSComp.txt:735) - - - - - No assignment given for field '%s' of type '%s' - (Originally from FSComp.txt:618) - - - - - This field is not a literal and cannot be used in a pattern - (Originally from FSComp.txt:583) - - - - - Named field '%s' is used more than once. - (Originally from FSComp.txt:1352) - - - - - Named field '%s' conflicts with autogenerated name for anonymous field. - (Originally from FSComp.txt:1353) - - - - - This field is readonly - (Originally from FSComp.txt:546) - - - - - Field '%s' is not static - (Originally from FSComp.txt:582) - - - - - This field is not mutable - (Originally from FSComp.txt:600) - - - - - All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' - (Originally from FSComp.txt:1058) - - - - - Extraneous fields have been given values - (Originally from FSComp.txt:619) - - - - - 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 - (Originally from FSComp.txt:594) - - - - - This expression form may only be used in sequence and computation expressions - (Originally from FSComp.txt:590) - - - - - The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... } - (Originally from FSComp.txt:641) - - - - - The expression form 'expr then expr' may only be used as part of an explicit object constructor - (Originally from FSComp.txt:597) - - - - - Expected %d expressions, got %d - (Originally from FSComp.txt:588) - - - - - TcExprUndelayed: delayed - (Originally from FSComp.txt:589) - - - - - Explicit type specifications cannot be used for exception constructors - (Originally from FSComp.txt:768) - - - - - Explicit type parameters may only be used on module or member bindings - (Originally from FSComp.txt:521) - - - - - An explicit static initializer should use the syntax 'static new(args) = expr' - (Originally from FSComp.txt:534) - - - - - An explicit object constructor should use the syntax 'new(args) = expr' - (Originally from FSComp.txt:535) - - - - - Expected unit-of-measure, not type - (Originally from FSComp.txt:560) - - - - - Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. - (Originally from FSComp.txt:557) - - - - - Expected type parameter, not unit-of-measure parameter - (Originally from FSComp.txt:558) - - - - - Expected type, not unit-of-measure - (Originally from FSComp.txt:559) - - - - - Expected an interface type - (Originally from FSComp.txt:634) - - - - - Expected module or namespace parent %s - (Originally from FSComp.txt:508) - - - - - The exception '%s' does not have a field named '%s'. - (Originally from FSComp.txt:1348) - - - - - Exception abbreviations should not have argument lists - (Originally from FSComp.txt:769) - - - - - Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception - (Originally from FSComp.txt:771) - - - - - Event '%s' is static - (Originally from FSComp.txt:667) - - - - - Event '%s' is not static - (Originally from FSComp.txt:668) - - - - - Enumerations cannot have members - (Originally from FSComp.txt:749) - - - - - Enumerations cannot have interface declarations - (Originally from FSComp.txt:757) - - - - - The type '%s' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property - (Originally from FSComp.txt:1118) - - - - - The 'EntryPointAttribute' attribute may only be used on function definitions in modules - (Originally from FSComp.txt:682) - - - - - '{ }' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. - (Originally from FSComp.txt:644) - - - - - Copy-and-update record expressions must include at least one field. - (Originally from FSComp.txt:1342) - - - - - Duplicate specification of an interface - (Originally from FSComp.txt:741) - - - - - The method or function '%s' should not be given explicit type argument(s) because it does not declare its type parameters explicitly - (Originally from FSComp.txt:541) - - - - - 'do!' cannot be used within sequence expressions - (Originally from FSComp.txt:649) - - - - - DLLImport stubs cannot be inlined - (Originally from FSComp.txt:513) - - - - - DLLImport bindings must be static members in a class or function definitions in a module - (Originally from FSComp.txt:1112) - - - - - Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. - (Originally from FSComp.txt:804) - - - - - A delegate constructor must be passed a single function value - (Originally from FSComp.txt:675) - - - - - The 'DefaultValue' attribute may only be used on 'val' declarations - (Originally from FSComp.txt:679) - - - - - The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization - (Originally from FSComp.txt:543) - - - - - 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 - (Originally from FSComp.txt:760) - - - - - This method already has a default implementation - (Originally from FSComp.txt:711) - - - - - The method implemented by this default is ambiguous - (Originally from FSComp.txt:712) - - - - - One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '%s' - (Originally from FSComp.txt:810) - - - - - This declaration element is not permitted in an augmentation - (Originally from FSComp.txt:762) - - - - - '%s' is not used correctly. Usage: %s. This is a custom operation in this query or computation expression. - (Originally from FSComp.txt:1263) - - - - - '%s' is not used correctly. This is a custom operation in this query or computation expression. - (Originally from FSComp.txt:1262) - - - - - A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression - (Originally from FSComp.txt:1244) - - - - - A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression - (Originally from FSComp.txt:1245) - - - - - The custom operation '%s' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. - (Originally from FSComp.txt:1246) - - - - - The definition of the custom operator '%s' does not use a valid combination of attribute flags - (Originally from FSComp.txt:1303) - - - - - '%s' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected %d argument(s), but given %d. - (Originally from FSComp.txt:1270) - - - - - A custom attribute must invoke an object constructor - (Originally from FSComp.txt:702) - - - - - A custom attribute must be a reference type - (Originally from FSComp.txt:700) - - - - - The number of args for a custom attribute does not match the expected number of args for the attribute constructor - (Originally from FSComp.txt:701) - - - - - Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - (Originally from FSComp.txt:1387) - - - - - Couldn't find Dispose on IDisposable, or it was overloaded - (Originally from FSComp.txt:544) - - - - - This copy-and-update record expression changes all fields of record type '%s'. Consider using the record construction syntax instead. - (Originally from FSComp.txt:1704) - - - - - The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record - (Originally from FSComp.txt:1518) - - - - - Constructors are not permitted as extension members - they must be defined as part of the original definition of the type - (Originally from FSComp.txt:1370) - - - - - Constructors cannot be defined for this type - (Originally from FSComp.txt:724) - - - - - Constructors cannot be specified in exception augmentations - (Originally from FSComp.txt:722) - - - - - 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))'. - (Originally from FSComp.txt:665) - - - - - 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. - (Originally from FSComp.txt:616) - - - - - This object constructor requires arguments - (Originally from FSComp.txt:636) - - - - - Constructor expressions for interfaces do not take arguments - (Originally from FSComp.txt:635) - - - - - The constructor does not have a field named '%s'. - (Originally from FSComp.txt:1350) - - - - - A constructor cannot have explicit type parameters. Consider using a static construction method instead. - (Originally from FSComp.txt:528) - - - - - This construct may only be used within sequence or computation expressions - (Originally from FSComp.txt:603) - - - - - 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 - (Originally from FSComp.txt:601) - - - - - This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. - (Originally from FSComp.txt:602) - - - - - This construct may only be used within computation expressions - (Originally from FSComp.txt:604) - - - - - This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {... }'. - (Originally from FSComp.txt:648) - - - - - This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder { ... }'. - (Originally from FSComp.txt:647) - - - - - 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 - (Originally from FSComp.txt:517) - - - - - Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes - (Originally from FSComp.txt:1108) - - - - - The 'ConditionalAttribute' attribute may only be used on members - (Originally from FSComp.txt:680) - - - - - Interfaces cannot contain definitions of concrete instance members. You may need to define a constructor on your type to indicate that the type is a class. - (Originally from FSComp.txt:721) - - - - - The 'CompiledName' attribute cannot be used with this language element - (Originally from FSComp.txt:609) - - - - - Cannot partially apply the extension method '%s' because the first parameter is a byref type. - (Originally from FSComp.txt:1514) - - - - - Cannot override inherited member '%s' because it is sealed - (Originally from FSComp.txt:1232) - - - - - Cannot inherit from a variable type - (Originally from FSComp.txt:607) - - - - - Cannot inherit a sealed type - (Originally from FSComp.txt:799) - - - - - Cannot inherit from interface type. Use interface ... with instead. - (Originally from FSComp.txt:800) - - - - - Cannot inherit from erased provided type - (Originally from FSComp.txt:1227) - - - - - Cannot create an extension of a sealed type - (Originally from FSComp.txt:628) - - - - - Cannot call the byref extension method '%s. 'this' parameter requires the value to be mutable or a non-readonly byref type. - (Originally from FSComp.txt:1512) - - - - - Cannot call an abstract base member: '%s' - (Originally from FSComp.txt:1085) - - - - - '%s' must be applied to an argument of type '%s', but has been applied to an argument of type '%s' - (Originally from FSComp.txt:1127) - - - - - '%s' can only be applied to optional arguments - (Originally from FSComp.txt:1128) - - - - - Byref types are not allowed to have optional type extensions. - (Originally from FSComp.txt:1513) - - - - - A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. - (Originally from FSComp.txt:1501) - - - - - A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. - (Originally from FSComp.txt:1502) - - - - - This expression uses a built-in implicit conversion to convert type '%s' to type '%s'. See https://aka.ms/fsharp-implicit-convs. - (Originally from FSComp.txt:1636) - - - - - A binding cannot be marked both 'use' and 'rec' - (Originally from FSComp.txt:676) - - - - - 'let!', 'use!' and 'do!' expressions may not be used in queries - (Originally from FSComp.txt:1314) - - - - - '%s' must be followed by a variable name. Usage: %s. - (Originally from FSComp.txt:1267) - - - - - '%s' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... %s ... - (Originally from FSComp.txt:1269) - - - - - 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - (Originally from FSComp.txt:1305) - - - - - Attributes cannot be applied to type extensions. - (Originally from FSComp.txt:1519) - - - - - The attributes of this type specify multiple kinds for the type - (Originally from FSComp.txt:776) - - - - - Attributes are not allowed within patterns - (Originally from FSComp.txt:539) - - - - - Attributes are not permitted on 'let' bindings in expressions - (Originally from FSComp.txt:678) - - - - - 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. - (Originally from FSComp.txt:695) - - - - - This attribute is not valid for use on this language element - (Originally from FSComp.txt:696) - - - - - Attribute expressions must be calls to object constructors - (Originally from FSComp.txt:703) - - - - - The attribute 'AutoOpen(\"%s\")' in the assembly '%s' did not refer to a valid module or namespace in that assembly and has been ignored - (Originally from FSComp.txt:820) - - - - - The attribute '%s' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. - (Originally from FSComp.txt:1084) - - - - - At least one override did not correctly implement its corresponding abstract member - (Originally from FSComp.txt:638) - - - - - The member '%s' does not accept the correct number of arguments. One overload accepts %d arguments, but %d were given. The required signature is '%s'.%s - (Originally from FSComp.txt:624) - - - - - The member '%s' does not accept the correct number of arguments. %d argument(s) are expected, but %d were given. The required signature is '%s'.%s - (Originally from FSComp.txt:623) - - - - - Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression - (Originally from FSComp.txt:568) - - - - - Anonymous type variables are not permitted in this declaration - (Originally from FSComp.txt:569) - - - - - The field '%s' appears multiple times in this anonymous record type. - (Originally from FSComp.txt:1678) - - - - - This anonymous record has an extra field. Remove field '%s'. - (Originally from FSComp.txt:1400) - - - - - This anonymous record is missing field '%s'. - (Originally from FSComp.txt:1398) - - - - - This anonymous record should have field '%s' but here has field '%s'. - (Originally from FSComp.txt:1402) - - - - - This anonymous record should have field '%s' but here has fields %s. - (Originally from FSComp.txt:1403) - - - - - This anonymous record has extra fields. Remove fields %s. - (Originally from FSComp.txt:1401) - - - - - This anonymous record is missing fields %s. - (Originally from FSComp.txt:1399) - - - - - This anonymous record should have fields %s; but here has field '%s'. - (Originally from FSComp.txt:1404) - - - - - This anonymous record should have fields %s; but here has fields %s. - (Originally from FSComp.txt:1405) - - - - - Invalid Anonymous Record type declaration. - (Originally from FSComp.txt:1395) - - - - - This anonymous record does not exactly match the expected shape. Add the missing fields %s and remove the extra fields %s. - (Originally from FSComp.txt:1397) - - - - - The field '%s' appears multiple times in this record expression. - (Originally from FSComp.txt:1677) - - - - - Two anonymous record types are from different assemblies '%s' and '%s' - (Originally from FSComp.txt:1396) - - - - - This feature is not supported in this version of F#. You may need to add /langversion:preview to use this feature. - (Originally from FSComp.txt:1530) - - - - - This expression has type '%s' and is only made compatible with type '%s' through an ambiguous implicit conversion. Consider using an explicit call to 'op_Implicit'. The applicable implicit conversions are:%s - (Originally from FSComp.txt:1634) - - - - - The meaning of _ is ambiguous here. It cannot be used for a discarded variable and a function shorthand in the same scope. - (Originally from FSComp.txt:1716) - - - - - Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal - (Originally from FSComp.txt:784) - - - - - All implemented interfaces should be declared on the initial declaration of the type - (Originally from FSComp.txt:759) - - - - - Active patterns do not have fields. This syntax is invalid. - (Originally from FSComp.txt:1349) - - - - - 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. - (Originally from FSComp.txt:613) - - - - - This property overrides or implements an abstract property but the abstract property doesn't have a corresponding %s - (Originally from FSComp.txt:714) - - - - - Abstract members are not permitted in an augmentation - they must be defined as part of the type itself - (Originally from FSComp.txt:707) - - - - - Abbreviations for Common IL exception types must have a matching object constructor - (Originally from FSComp.txt:772) - - - - - Abbreviations for Common IL exceptions cannot take arguments - (Originally from FSComp.txt:770) - - - - - Abbreviated types cannot be given the 'Sealed' attribute - (Originally from FSComp.txt:798) - - - - - F# supports array ranks between 1 and 32. The value %d is not allowed. - (Originally from FSComp.txt:1309) - - - - - A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' - (Originally from FSComp.txt:94) - - - - - A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' - (Originally from FSComp.txt:1505) - - - - - The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed - (Originally from FSComp.txt:96) - - - - - This value does not have a valid property setter type - (Originally from FSComp.txt:90) - - - - - Unexpected decode of InternalsVisibleToAttribute - (Originally from FSComp.txt:101) - - - - - Unexpected decode of InterfaceDataVersionAttribute - (Originally from FSComp.txt:102) - - - - - Unexpected decode of AutoOpenAttribute - (Originally from FSComp.txt:100) - - - - - Unexpected use of a byref-typed variable - (Originally from FSComp.txt:93) - - - - - The module/namespace '%s' from compilation unit '%s' did not contain the val '%s' - (Originally from FSComp.txt:1079) - - - - - The module/namespace '%s' from compilation unit '%s' did not contain the namespace, module or type '%s' - (Originally from FSComp.txt:1080) - - - - - The module/namespace '%s' from compilation unit '%s' did not contain the module/namespace '%s' - (Originally from FSComp.txt:1078) - - - - - The type/module '%s' is not a concrete module or type - (Originally from FSComp.txt:82) - - - - - The type '%s' has an inline assembly code representation - (Originally from FSComp.txt:83) - - - - - Two modules named '%s' occur in two parts of this assembly - (Originally from FSComp.txt:86) - - - - - Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding - (Originally from FSComp.txt:97) - - - - - Recursive values cannot be directly assigned to the non-mutable field '%s' of the type '%s' within a recursive binding. Consider using a mutable field instead. - (Originally from FSComp.txt:99) - - - - - Recursive values cannot appear directly as a construction of the type '%s' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. - (Originally from FSComp.txt:98) - - - - - This is not a valid constant expression or custom attribute value - (Originally from FSComp.txt:104) - - - - - A namespace and a module named '%s' both occur in two parts of this assembly - (Originally from FSComp.txt:85) - - - - - Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. - (Originally from FSComp.txt:95) - - - - - Invalid member signature encountered because of an earlier error - (Originally from FSComp.txt:89) - - - - - Invalid form for a property setter. At least one argument is required. - (Originally from FSComp.txt:92) - - - - - Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. - (Originally from FSComp.txt:91) - - - - - This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation - (Originally from FSComp.txt:1074) - - - - - Two type definitions named '%s' occur in namespace '%s' in two parts of this assembly - (Originally from FSComp.txt:87) - - - - - This literal expression or attribute argument results in an arithmetic overflow. - (Originally from FSComp.txt:1354) - - - - - A module and a type definition named '%s' occur in namespace '%s' in two parts of this assembly - (Originally from FSComp.txt:88) - - - - - Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. - (Originally from FSComp.txt:1511) - - - - - Active patterns cannot return more than 7 possibilities - (Originally from FSComp.txt:103) - - - - - (Suggested name) - (Originally from FSComp.txt:968) - - - - - The struct or class field '%s' is not accessible from this code location - (Originally from FSComp.txt:977) - - - - - Source file is too large to embed in a portable PDB - (Originally from FSComp.txt:873) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - The .NET SDK for this script could not be determined. If the script is in a directory using a 'global.json' then ensure the relevant .NET SDK is installed. Unexpected error '%s'. - (Originally from FSComp.txt:1631) - - - - - The .NET SDK for this script could not be determined. dotnet.exe could not be found ensure a .NET SDK is installed. - (Originally from FSComp.txt:1632) - - - - - The .NET SDK for this script could not be determined. If the script is in a directory using a 'global.json' then ensure the relevant .NET SDK is installed. The output from '%s --version' in the directory '%s' was: '%s' and the exit code was '%d'. - (Originally from FSComp.txt:1630) - - - - - Consider using 'return!' instead of 'return'. - (Originally from FSComp.txt:37) - - - - - This state machine is not statically compilable and no alternative is available. %s. Use an 'if __useResumableCode then <state-machine> else <alternative>' to give an alternative. - (Originally from FSComp.txt:1659) - - - - - This state machine is not statically compilable. %s. An alternative dynamic implementation will be used, which may be slower. Consider adjusting your code to ensure this state machine is statically compilable, or else suppress this warning. - (Originally from FSComp.txt:1658) - - - - - The state machine has an unexpected form - (Originally from FSComp.txt:1671) - - - - - The resumable code value(s) '%s' does not have a definition - (Originally from FSComp.txt:1669) - - - - - A resumable code invocation at '%s' could not be reduced - (Originally from FSComp.txt:1662) - - - - - A delegate or function producing resumable code in a state machine has type parameters - (Originally from FSComp.txt:1670) - - - - - A try/finally may not contain resumption points - (Originally from FSComp.txt:1666) - - - - - The 'with' block of a try/with may not contain resumption points - (Originally from FSComp.txt:1667) - - - - - A 'let rec' occured in the resumable code specification - (Originally from FSComp.txt:1663) - - - - - A fast integer for loop may not contain resumption points - (Originally from FSComp.txt:1668) - - - - - A target label for __resumeAt was not statically determined. A __resumeAt with a non-static target label may only appear at the start of a resumable code method - (Originally from FSComp.txt:1665) - - - - - A constrained generic construct occured in the resumable code specification - (Originally from FSComp.txt:1664) - - - - - Replace with '%s' - (Originally from FSComp.txt:20) - - - - - Recursive class hierarchy in type '%s' - (Originally from FSComp.txt:969) - - - - - A ReadOnly attribute has been applied to a struct type with a mutable field. - (Originally from FSComp.txt:1500) - - - - - Unexpected token '%s' in preprocessor expression - (Originally from FSComp.txt:1361) - - - - - Missing token '%s' in preprocessor expression - (Originally from FSComp.txt:1363) - - - - - Incomplete preprocessor expression - (Originally from FSComp.txt:1362) - - - - - Unexpected character '%s' in preprocessor expression - (Originally from FSComp.txt:1360) - - - - - Expected single line comment or end of line - (Originally from FSComp.txt:1054) - - - - - #i is not supported by the registered PackageManagers - (Originally from FSComp.txt:1528) - - - - - An error occurred while reading the F# metadata of assembly '%s'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. - (Originally from FSComp.txt:1494) - - - - - An error occurred while reading the F# metadata node at position %d in table '%s' of assembly '%s'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. - (Originally from FSComp.txt:1364) - - - - - Newly added pickle state cannot be used in FSharp.Core, since it must be working in older compilers+tooling as well. The time window is at least 3 years after feature introduction. Violation: %s . Context: \n %s - (Originally from FSComp.txt:1721) - - - - - Error reading/writing metadata for the F# compiled DLL '%s'. Was the DLL compiled with an earlier version of the F# compiler? (error: '%s'). - (Originally from FSComp.txt:81) - - - - - A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'. - (Originally from FSComp.txt:33) - - - - - Problem with filename '%s': Illegal characters in path. - (Originally from FSComp.txt:1170) - - - - - Partial active patterns may only generate one result - (Originally from FSComp.txt:987) - - - - - Missing variable '%s' - (Originally from FSComp.txt:986) - - - - - Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. - (Originally from FSComp.txt:1293) - - - - - Accessibility modifiers are not permitted on an 'inherits' declaration - (Originally from FSComp.txt:433) - - - - - Accessibility modifiers should come immediately prior to the identifier naming a construct - (Originally from FSComp.txt:404) - - - - - 'use' bindings are not permitted in modules and are treated as 'let' bindings - (Originally from FSComp.txt:397) - - - - - 'use' bindings are not permitted in primary constructors - (Originally from FSComp.txt:396) - - - - - Unmatched 'with' or badly formatted 'with' block - (Originally from FSComp.txt:420) - - - - - Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. - (Originally from FSComp.txt:1291) - - - - - Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. - (Originally from FSComp.txt:1292) - - - - - Unmatched '(' - (Originally from FSComp.txt:446) - - - - - Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. - (Originally from FSComp.txt:1290) - - - - - Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. - (Originally from FSComp.txt:1289) - - - - - Unmatched '[<'. Expected closing '>]' - (Originally from FSComp.txt:1273) - - - - - Unmatched 'class', 'interface' or 'struct' - (Originally from FSComp.txt:418) - - - - - Unmatched '[|' - (Originally from FSComp.txt:462) - - - - - Unmatched '[' - (Originally from FSComp.txt:457) - - - - - Unmatched '{|' - (Originally from FSComp.txt:464) - - - - - Unmatched '{' - (Originally from FSComp.txt:463) - - - - - Unmatched 'begin' or 'struct' - (Originally from FSComp.txt:411) - - - - - Unmatched 'begin' - (Originally from FSComp.txt:423) - - - - - Unmatched '%s' - (Originally from FSComp.txt:461) - - - - - Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. - (Originally from FSComp.txt:441) - - - - - Unexpected token '%s' or incomplete expression - (Originally from FSComp.txt:1329) - - - - - Accessibility modifiers are not permitted here, but '%s' was given. - (Originally from FSComp.txt:402) - - - - - Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? - (Originally from FSComp.txt:1394) - - - - - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - (Originally from FSComp.txt:40) - - - - - A semicolon is not expected at this point - (Originally from FSComp.txt:400) - - - - - Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. - (Originally from FSComp.txt:1124) - - - - - Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. - (Originally from FSComp.txt:472) - - - - - Unexpected integer literal in unit-of-measure expression - (Originally from FSComp.txt:473) - - - - - Unexpected infix operator in type expression - (Originally from FSComp.txt:469) - - - - - Unexpected identifier: '%s' - (Originally from FSComp.txt:440) - - - - - Unexpected end of input in 'match' or 'try' expression - (Originally from FSComp.txt:1278) - - - - - Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. - (Originally from FSComp.txt:1276) - - - - - Unexpected end of input in type signature - (Originally from FSComp.txt:1283) - - - - - Unexpected end of input in type definition - (Originally from FSComp.txt:1284) - - - - - Unexpected end of input in type arguments - (Originally from FSComp.txt:1282) - - - - - Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. - (Originally from FSComp.txt:1275) - - - - - Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from FSComp.txt:1279) - - - - - Unexpected end of input in object members - (Originally from FSComp.txt:1285) - - - - - Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. - (Originally from FSComp.txt:1274) - - - - - Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. - (Originally from FSComp.txt:1281) - - - - - Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. - (Originally from FSComp.txt:1277) - - - - - Unexpected end of input in expression - (Originally from FSComp.txt:1287) - - - - - Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from FSComp.txt:1280) - - - - - Unexpected end of input in 'else if' or 'elif' branch of conditional expression. Expected 'elif <expr> then <expr>' or 'else if <expr> then <expr>'. - (Originally from FSComp.txt:1706) - - - - - Unexpected end of input in value, function or member definition - (Originally from FSComp.txt:1286) - - - - - Unexpected end of input - (Originally from FSComp.txt:401) - - - - - Unexpected empty type moduleDefn list - (Originally from FSComp.txt:413) - - - - - '_' cannot be used as field name - (Originally from FSComp.txt:1343) - - - - - _. shorthand syntax for lambda functions can only be used with atomic expressions. That means expressions with no whitespace unless enclosed in parentheses. - (Originally from FSComp.txt:1717) - - - - - Unclosed block - (Originally from FSComp.txt:410) - - - - - Type name cannot be empty. - (Originally from FSComp.txt:1331) - - - - - Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' - (Originally from FSComp.txt:426) - - - - - Accessibility modifiers are not permitted in this position for type abbreviations - (Originally from FSComp.txt:436) - - - - - The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' - (Originally from FSComp.txt:482) - - - - - The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' - (Originally from FSComp.txt:483) - - - - - Syntax error in labelled type argument - (Originally from FSComp.txt:468) - - - - - Syntax error - (Originally from FSComp.txt:416) - - - - - Successive patterns should be separated by spaces or tupled - (Originally from FSComp.txt:447) - - - - - Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized - (Originally from FSComp.txt:456) - - - - - A setter property may have at most two argument groups - (Originally from FSComp.txt:1071) - - - - - Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' - (Originally from FSComp.txt:429) - - - - - Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. - (Originally from FSComp.txt:444) - - - - - In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array - (Originally from FSComp.txt:459) - - - - - At most one 'with' augmentation is permitted - (Originally from FSComp.txt:399) - - - - - Only '#' compiler directives may occur prior to the first 'namespace' declaration - (Originally from FSComp.txt:403) - - - - - Only class types may take value arguments - (Originally from FSComp.txt:422) - - - - - The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' - (Originally from FSComp.txt:1077) - - - - - Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. - (Originally from FSComp.txt:1075) - - - - - Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. - (Originally from FSComp.txt:1076) - - - - - No matching 'in' found for this 'let' - (Originally from FSComp.txt:448) - - - - - No #endif found for #if or #else - (Originally from FSComp.txt:394) - - - - - No '=' symbol should follow a 'namespace' declaration - (Originally from FSComp.txt:481) - - - - - This member access is ambiguous. Please use parentheses around the object creation, e.g. '(new SomeType(args)).MemberName' - (Originally from FSComp.txt:1647) - - - - - Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' - (Originally from FSComp.txt:405) - - - - - To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. - (Originally from FSComp.txt:1307) - - - - - Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. - (Originally from FSComp.txt:1306) - - - - - When the visibility for a property is specified, setting the visibility of the set or get method is not allowed. - (Originally from FSComp.txt:428) - - - - - The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead - (Originally from FSComp.txt:470) - - - - - A module name must be a simple name, not a path - (Originally from FSComp.txt:412) - - - - - A module abbreviation must be a simple name, not a path - (Originally from FSComp.txt:406) - - - - - Missing union case name - (Originally from FSComp.txt:1708) - - - - - Expected type argument or static argument - (Originally from FSComp.txt:1122) - - - - - Missing qualification after '.' - (Originally from FSComp.txt:458) - - - - - Expecting member body - (Originally from FSComp.txt:1713) - - - - - Missing keyword '%s' - (Originally from FSComp.txt:1714) - - - - - Unmatched '<'. Expected closing '>' - (Originally from FSComp.txt:1123) - - - - - Missing function body - (Originally from FSComp.txt:467) - - - - - Mismatched quotation, beginning with '%s' - (Originally from FSComp.txt:460) - - - - - Mismatched quotation operator name, beginning with '%s' - (Originally from FSComp.txt:475) - - - - - This member is not permitted in an object implementation - (Originally from FSComp.txt:466) - - - - - The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings - (Originally from FSComp.txt:445) - - - - - Invalid use of 'rec' keyword - (Originally from FSComp.txt:1383) - - - - - Invalid property getter or setter - (Originally from FSComp.txt:1072) - - - - - Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. - (Originally from FSComp.txt:1100) - - - - - Invalid prefix operator - (Originally from FSComp.txt:1099) - - - - - Invalid literal in type - (Originally from FSComp.txt:471) - - - - - Invalid declaration syntax - (Originally from FSComp.txt:424) - - - - - Invalid anonymous record type - (Originally from FSComp.txt:1517) - - - - - Invalid anonymous record expression - (Originally from FSComp.txt:1516) - - - - - Interfaces always have the same visibility as the enclosing type - (Originally from FSComp.txt:430) - - - - - An integer for loop must use a simple identifier - (Originally from FSComp.txt:398) - - - - - Accessibility modifiers are not permitted on inline assembly code types - (Originally from FSComp.txt:439) - - - - - 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. - (Originally from FSComp.txt:434) - - - - - An indexer property must be given at least one argument - (Originally from FSComp.txt:1073) - - - - - Incomplete operator expression (example a^b) or qualified type invocation (example: ^T.Name) - (Originally from FSComp.txt:480) - - - - - Incomplete character literal (example: 'Q') or qualified type invocation (example: 'T.Name) - (Originally from FSComp.txt:479) - - - - - Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from FSComp.txt:451) - - - - - 'in' or '=' expected - (Originally from FSComp.txt:454) - - - - - Neither 'member val' nor 'override val' definitions are permitted in object expressions. - (Originally from FSComp.txt:1341) - - - - - Denominator must not be 0 in unit-of-measure exponent - (Originally from FSComp.txt:478) - - - - - The '%s' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - (Originally from FSComp.txt:409) - - - - - The '%s' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - (Originally from FSComp.txt:408) - - - - - Ignoring attributes on module abbreviation - (Originally from FSComp.txt:407) - - - - - Identifier expected - (Originally from FSComp.txt:453) - - - - - A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' - (Originally from FSComp.txt:427) - - - - - A getter property may have at most one argument group - (Originally from FSComp.txt:1070) - - - - - 'get', 'set' or 'get,set' required - (Originally from FSComp.txt:421) - - - - - 'get' and/or 'set' required - (Originally from FSComp.txt:425) - - - - - Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. - (Originally from FSComp.txt:1294) - - - - - Field bindings must have the form 'id = expr;' - (Originally from FSComp.txt:465) - - - - - Expecting type - (Originally from FSComp.txt:1709) - - - - - Expecting pattern - (Originally from FSComp.txt:1689) - - - - - Expecting expression - (Originally from FSComp.txt:1679) - - - - - Expected a type after this point - (Originally from FSComp.txt:1272) - - - - - Expected a pattern after this point - (Originally from FSComp.txt:1690) - - - - - Unexpected end of type. Expected a name after this point. - (Originally from FSComp.txt:1288) - - - - - Expected an expression after this point - (Originally from FSComp.txt:1271) - - - - - The block following this '%s' is unfinished. Every code block is an expression and must have a result. '%s' cannot be the final code element in a block. Consider giving this block an explicit result. - (Originally from FSComp.txt:450) - - - - - Attempted to parse this as an operator name, but failed - (Originally from FSComp.txt:1125) - - - - - Error in the return expression for this 'let'. Possible incorrect indentation. - (Originally from FSComp.txt:449) - - - - - End of file in verbatim string embedded in comment begun at or before here - (Originally from FSComp.txt:391) - - - - - End of file in verbatim string begun at or before here - (Originally from FSComp.txt:388) - - - - - End of file in triple-quote string embedded in comment begun at or before here - (Originally from FSComp.txt:1120) - - - - - End of file in triple-quote string begun at or before here - (Originally from FSComp.txt:1119) - - - - - End of file in string embedded in comment begun at or before here - (Originally from FSComp.txt:390) - - - - - End of file in string begun at or before here - (Originally from FSComp.txt:387) - - - - - Incomplete interpolated verbatim string begun at or before here - (Originally from FSComp.txt:1626) - - - - - Incomplete interpolated triple-quote string begun at or before here - (Originally from FSComp.txt:1627) - - - - - Incomplete interpolated string expression fill begun at or before here - (Originally from FSComp.txt:1624) - - - - - Incomplete interpolated string begun at or before here - (Originally from FSComp.txt:1625) - - - - - End of file in IF-OCAML section begun at or before here - (Originally from FSComp.txt:392) - - - - - End of file in #if section begun at or after here - (Originally from FSComp.txt:386) - - - - - End of file in directive begun at or before here - (Originally from FSComp.txt:393) - - - - - End of file in comment begun at or before here - (Originally from FSComp.txt:389) - - - - - Accessibility modifiers are not permitted in this position for enum types - (Originally from FSComp.txt:437) - - - - - Accessibility modifiers are not permitted on enumeration fields - (Originally from FSComp.txt:442) - - - - - A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. - (Originally from FSComp.txt:419) - - - - - Invalid interpolated string. This interpolated string expression fill is empty, an expression was expected. - (Originally from FSComp.txt:1628) - - - - - Accessibility modifiers are not permitted on 'do' bindings, but '%s' was given. - (Originally from FSComp.txt:385) - - - - - Constraint intersection syntax may only be used with flexible types, e.g. '#IDisposable & #ISomeInterface'. - (Originally from FSComp.txt:1719) - - - - - Consider using a separate record type instead - (Originally from FSComp.txt:443) - - - - - Augmentations are not permitted on delegate type moduleDefns - (Originally from FSComp.txt:417) - - - - - Attributes should be placed before 'val' - (Originally from FSComp.txt:414) - - - - - Attributes are not permitted on 'inherit' declarations - (Originally from FSComp.txt:432) - - - - - Attributes are not allowed here - (Originally from FSComp.txt:435) - - - - - Attributes have been ignored in this construct - (Originally from FSComp.txt:395) - - - - - Attributes are not permitted on interface implementations - (Originally from FSComp.txt:415) - - - - - Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. - (Originally from FSComp.txt:1330) - - - - - 'assert' may not be used as a first class value. Use 'assert <expr>' instead. - (Originally from FSComp.txt:452) - - - - - 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. - (Originally from FSComp.txt:455) - - - - - All enum fields must be given values - (Originally from FSComp.txt:438) - - - - - Active pattern case identifiers must begin with an uppercase letter - (Originally from FSComp.txt:476) - - - - - The '|' character is not permitted in active pattern case identifiers - (Originally from FSComp.txt:477) - - - - - Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. - (Originally from FSComp.txt:431) - - - - - Package manager key '%s' was not registered in %s. Currently registered: %s. To learn more about extensions, visit: https://aka.ms/dotnetdepmanager - (Originally from FSComp.txt:842) - - - - - %s - (Originally from FSComp.txt:843) - - - - - The 'package management' feature requires language version 5.0 or above - (Originally from FSComp.txt:1526) - - - - - Write the xmldoc of the assembly to the given file - (Originally from FSComp.txt:854) - - - - - Specify a Win32 resource file (.res) - (Originally from FSComp.txt:866) - - - - - Specify a Win32 manifest file - (Originally from FSComp.txt:867) - - - - - Specify a Win32 icon file (.ico) - (Originally from FSComp.txt:865) - - - - - Report all warnings as errors - (Originally from FSComp.txt:886) - - - - - Report specific warnings as errors - (Originally from FSComp.txt:887) - - - - - Enable specific warnings that may be off by default - (Originally from FSComp.txt:890) - - - - - Set a warning level (0-5) - (Originally from FSComp.txt:888) - - - - - Display compiler version banner and exit - (Originally from FSComp.txt:896) - - - - - Output messages in UTF-8 encoding - (Originally from FSComp.txt:900) - - - - - Enable high-entropy ASLR - (Originally from FSComp.txt:927) - - - - - Unrecognized target '%s', expected 'exe', 'winexe', 'library' or 'module' - (Originally from FSComp.txt:937) - - - - - Unrecognized value '%s' for --langversion use --langversion:? for complete list - (Originally from FSComp.txt:84) - - - - - Unrecognized debug type '%s', expected 'pdbonly' or 'full' - (Originally from FSComp.txt:938) - - - - - Invalid value '%s' for --interfacedata, valid value are: none, file, compress. - (Originally from FSComp.txt:934) - - - - - Unrecognized platform '%s', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu'. The default is anycpu. - (Originally from FSComp.txt:943) - - - - - Invalid value '%s' for --optimizationdata, valid value are: none, file, compress. - (Originally from FSComp.txt:936) - - - - - Algorithm '%s' is not supported - (Originally from FSComp.txt:944) - - - - - Unknown --test argument: '%s' - (Originally from FSComp.txt:942) - - - - - Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib - (Originally from FSComp.txt:929) - - - - - Enable or disable tailcalls - (Originally from FSComp.txt:879) - - - - - Supported language versions: - (Originally from FSComp.txt:1540) - - - - - Specify subsystem version of this assembly - (Originally from FSComp.txt:928) - - - - - Specify a strong name key file - (Originally from FSComp.txt:855) - - - - - Specify a strong name key container - (Originally from FSComp.txt:856) - - - - - Override indentation rules implied by the language version - (Originally from FSComp.txt:1541) - - - - - 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. - (Originally from FSComp.txt:907) - - - - - Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated - (Originally from FSComp.txt:906) - - - - - Source link information file to embed in the portable PDB file - (Originally from FSComp.txt:871) - - - - - Resolve assembly references using directory-based rules rather than MSBuild resolution - (Originally from FSComp.txt:910) - - - - - Include F# interface information, the default is file. Essential for distributing libraries. - (Originally from FSComp.txt:933) - - - - - Print the inferred interface of the assembly to a file - (Originally from FSComp.txt:861) - - - - - Short form of '%s' - (Originally from FSComp.txt:911) - - - - - Specify language version such as 'latest' or 'preview'. - (Originally from FSComp.txt:1539) - - - - - Response file '%s' not found in '%s' - (Originally from FSComp.txt:1372) - - - - - Response file name '%s' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long - (Originally from FSComp.txt:1373) - - - - - Read response file for more options - (Originally from FSComp.txt:897) - - - - - Embed the specified managed resource - (Originally from FSComp.txt:874) - - - - - Use a resident background compilation service to improve compiler startup times. - (Originally from FSComp.txt:908) - - - - - Disable implicit generation of constructs using reflection - (Originally from FSComp.txt:885) - - - - - Reference an assembly (Short form: -r) - (Originally from FSComp.txt:863) - - - - - Produce a reference assembly with the specified file path. - (Originally from FSComp.txt:882) - - - - - Produce a reference assembly, instead of a full assembly, as the primary output - (Originally from FSComp.txt:881) - - - - - Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed - (Originally from FSComp.txt:853) - - - - - Problem with codepage '%d': %s - (Originally from FSComp.txt:844) - - - - - Specify the preferred output language culture name (e.g. es-ES, ja-JP) - (Originally from FSComp.txt:931) - - - - - Limit which platforms this code can run on: x86, x64, Arm, Arm64, Itanium, anycpu32bitpreferred, or anycpu. The default is anycpu. - (Originally from FSComp.txt:858) - - - - - The pdb output file name cannot match the build output filename use --pdb:filename.pdb - (Originally from FSComp.txt:872) - - - - - Name the output debug file - (Originally from FSComp.txt:909) - - - - - Maps physical paths to source path names output by the compiler - (Originally from FSComp.txt:883) - - - - - Enable optimizations (Short form: -O) - (Originally from FSComp.txt:878) - - - - - Specify included optimization information, the default is file. Important for distributed libraries. - (Originally from FSComp.txt:935) - - - - - Do not include the default Win32 manifest - (Originally from FSComp.txt:868) - - - - - Disable specific warning messages - (Originally from FSComp.txt:889) - - - - - Suppress compiler copyright message - (Originally from FSComp.txt:894) - - - - - Do not reference the default CLI assemblies by default - (Originally from FSComp.txt:905) - - - - - Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. - (Originally from FSComp.txt:859) - - - - - Don't add a resource to the generated assembly containing F#-specific metadata - (Originally from FSComp.txt:860) - - - - - Don't copy FSharp.Core.dll along the produced binaries - (Originally from FSComp.txt:932) - - - - - Name of the output file (Short form: -o) - (Originally from FSComp.txt:847) - - - - - Ignore ML compatibility warnings - (Originally from FSComp.txt:893) - - - - - Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] - (Originally from FSComp.txt:875) - - - - - Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) - (Originally from FSComp.txt:902) - - - - - Invalid warning level '%d' - (Originally from FSComp.txt:939) - - - - - Invalid value '%s' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. - (Originally from FSComp.txt:941) - - - - - Invalid version '%s' for '--subsystemversion'. The version must be 4.00 or greater. - (Originally from FSComp.txt:940) - - - - - Invalid response file '%s' ( '%s' ) - (Originally from FSComp.txt:1371) - - - - - Invalid reference assembly path' - (Originally from FSComp.txt:1175) - - - - - Invalid use of emitting a reference assembly, do not use '--standalone or --staticlink' with '--refonly or --refout'. - (Originally from FSComp.txt:1176) - - - - - Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath' - (Originally from FSComp.txt:1174) - - - - - The command-line option '%s' is for test purposes only - (Originally from FSComp.txt:922) - - - - - - RESOURCES - - (Originally from FSComp.txt:916) - - - - - - OUTPUT FILES - - (Originally from FSComp.txt:914) - - - - - - MISCELLANEOUS - - (Originally from FSComp.txt:919) - - - - - - LANGUAGE - - (Originally from FSComp.txt:920) - - - - - - INPUT FILES - - (Originally from FSComp.txt:915) - - - - - - ERRORS AND WARNINGS - - (Originally from FSComp.txt:921) - - - - - - CODE GENERATION - - (Originally from FSComp.txt:917) - - - - - - ADVANCED - - (Originally from FSComp.txt:918) - - - - - Display this usage message (Short form: -?) - (Originally from FSComp.txt:895) - - - - - Display the allowed values for language version. - (Originally from FSComp.txt:1538) - - - - - Output messages with fully qualified paths - (Originally from FSComp.txt:901) - - - - - Emit debug information in quotations - (Originally from FSComp.txt:930) - - - - - Embed specific source files in the portable PDB file - (Originally from FSComp.txt:870) - - - - - Embed all source files in the portable PDB file - (Originally from FSComp.txt:869) - - - - - Produce a deterministic assembly (including module version GUID and timestamp) - (Originally from FSComp.txt:880) - - - - - Delay-sign the assembly using only the public portion of the strong name key - (Originally from FSComp.txt:852) - - - - - Define conditional compilation symbols (Short form: -d) - (Originally from FSComp.txt:892) - - - - - Emit debug information (Short form: -g) - (Originally from FSComp.txt:876) - - - - - Specify debugging type: full, portable, embedded, pdbonly. ('%s' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). - (Originally from FSComp.txt:877) - - - - - The command-line option '%s' has been deprecated - (Originally from FSComp.txt:923) - - - - - The command-line option '%s' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. - (Originally from FSComp.txt:925) - - - - - The command-line option '%s' has been deprecated. Use '%s' instead. - (Originally from FSComp.txt:924) - - - - - Enable or disable cross-module optimizations - (Originally from FSComp.txt:884) - - - - - Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt - (Originally from FSComp.txt:846) - - - - - Copyright (c) Microsoft Corporation. All Rights Reserved. - (Originally from FSComp.txt:845) - - - - - Output warning and error messages in color - (Originally from FSComp.txt:926) - - - - - Compress interface and optimization data files - (Originally from FSComp.txt:857) - - - - - Reference an assembly or directory containing a design time tool (Short form: -t) - (Originally from FSComp.txt:864) - - - - - Specify the codepage used to read source files - (Originally from FSComp.txt:898) - - - - - Use to override where the compiler looks for mscorlib.dll and framework components - (Originally from FSComp.txt:913) - - - - - The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. - (Originally from FSComp.txt:912) - - - - - Clear the package manager results cache - (Originally from FSComp.txt:899) - - - - - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - (Originally from FSComp.txt:904) - - - - - Generate overflow checks - (Originally from FSComp.txt:891) - - - - - Build a Windows executable - (Originally from FSComp.txt:849) - - - - - Build a module that can be added to another assembly - (Originally from FSComp.txt:851) - - - - - Build a library (Short form: -a) - (Originally from FSComp.txt:850) - - - - - Build a console executable - (Originally from FSComp.txt:848) - - - - - Base address for the library to be built - (Originally from FSComp.txt:903) - - - - - Print the inferred interfaces of all compilation files to associated signature files - (Originally from FSComp.txt:862) - - - - - A value marked as 'inline' has an unexpected value - (Originally from FSComp.txt:996) - - - - - A value marked as 'inline' could not be inlined - (Originally from FSComp.txt:997) - - - - - The value '%s' was marked inline but was not bound in the optimization environment - (Originally from FSComp.txt:994) - - - - - The value '%s' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible - (Originally from FSComp.txt:993) - - - - - Recursive ValValue %s - (Originally from FSComp.txt:999) - - - - - Local value %s not found during optimization - (Originally from FSComp.txt:995) - - - - - Failed to inline the value '%s' marked 'inline', perhaps because a recursive value was marked 'inline' - (Originally from FSComp.txt:998) - - - - - The value '%s' was marked 'InlineIfLambda' but was not determined to have a lambda value. This warning is for informational purposes only. - (Originally from FSComp.txt:1672) - - - - - The union type for union case '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('%s') in the name you are using. - (Originally from FSComp.txt:1013) - - - - - Unexpected empty long identifier - (Originally from FSComp.txt:1008) - - - - - Multiple types exist called '%s', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '%s'. - (Originally from FSComp.txt:1004) - - - - - 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'. - (Originally from FSComp.txt:1005) - - - - - The record type for the record field '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('%s') in the name you are using. - (Originally from FSComp.txt:1014) - - - - - The record type '%s' does not contain a label '%s'. - (Originally from FSComp.txt:1009) - - - - - No constructors are available for the type '%s' - (Originally from FSComp.txt:1012) - - - - - This is not a constructor or literal, or a constructor is being used incorrectly - (Originally from FSComp.txt:1007) - - - - - Invalid module/expression/type - (Originally from FSComp.txt:1003) - - - - - Invalid field label - (Originally from FSComp.txt:1010) - - - - - Invalid expression '%s' - (Originally from FSComp.txt:1011) - - - - - 'global' may only be used as the first name in a qualified path - (Originally from FSComp.txt:1006) - - - - - This value is not a function and cannot be applied. Did you intend to access the indexer via '%s[index]'? - (Originally from FSComp.txt:1490) - - - - - This value is not a function and cannot be applied. Did you intend to access the indexer via '%s.[index]'? - (Originally from FSComp.txt:1488) - - - - - (Originally from FSComp.txt:1492) - - - - - This expression is not a function and cannot be applied. Did you intend to access the indexer via 'expr[index]'? - (Originally from FSComp.txt:1491) - - - - - This expression is not a function and cannot be applied. Did you intend to access the indexer via 'expr.[index]'? - (Originally from FSComp.txt:1489) - - - - - This value is not a function and cannot be applied. Did you forget to terminate a declaration? - (Originally from FSComp.txt:1493) - - - - - This value is not a function and cannot be applied. - (Originally from FSComp.txt:1487) - - - - - No Invoke methods found for delegate type - (Originally from FSComp.txt:979) - - - - - Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. - (Originally from FSComp.txt:58) - - - - - + %d overloads - (Originally from FSComp.txt:1327) - - - - - + 1 overload - (Originally from FSComp.txt:1326) - - - - - Resource header beginning at offset %s is malformed. - (Originally from FSComp.txt:1543) - - - - - Stream does not begin with a null resource and is not in '.RES' format. - (Originally from FSComp.txt:1542) - - - - - More than one Invoke method found for delegate type - (Originally from FSComp.txt:980) - - - - - The use of 'module M = struct ... end ' was deprecated in F# 2.0 and is no longer supported. Remove the 'struct' and 'end' and use indentation instead - (Originally from FSComp.txt:1096) - - - - - The use of 'module M = sig ... end ' was deprecated in F# 2.0 and is no longer supported. Remove the 'sig' and 'end' and use indentation instead - (Originally from FSComp.txt:1094) - - - - - The use of 'module M: sig ... end ' was deprecated in F# 2.0 and is no longer supported. Change the ':' to an '=' and remove the 'sig' and 'end' and use indentation instead - (Originally from FSComp.txt:1093) - - - - - The use of multiple parenthesized type parameters before a generic type name such as '(int, int) Map' was deprecated in F# 2.0 and is no longer supported - (Originally from FSComp.txt:1095) - - - - - This construct is for ML compatibility. %s. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. - (Originally from FSComp.txt:1089) - - - - - The use of '#light \"off\"' or '#indent \"off\"' was deprecated in F# 2.0 and is no longer supported - (Originally from FSComp.txt:1092) - - - - - In previous versions of F# '%s' was a reserved keyword but the use of this keyword is now deprecated - (Originally from FSComp.txt:1091) - - - - - This construct is deprecated. %s. You can enable this feature by using '--langversion:5.0' and '--mlcompatibility'. - (Originally from FSComp.txt:1090) - - - - - This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '%s'. - (Originally from FSComp.txt:26) - - - - - Method or object constructor '%s' is not static - (Originally from FSComp.txt:1393) - - - - - Infix operator member '%s' has %d initial argument(s). Expected a tuple of 3 arguments - (Originally from FSComp.txt:1338) - - - - - Infix operator member '%s' has %d initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from FSComp.txt:1056) - - - - - Infix operator member '%s' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from FSComp.txt:1055) - - - - - Infix operator member '%s' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from FSComp.txt:1057) - - - - - Pattern discard is not allowed for union case that takes no data. - (Originally from FSComp.txt:1691) - - - - - (loading description...) - (Originally from FSComp.txt:1334) - - - - - All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length %d of type\n %s \nThis element is a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:23) - - - - - All elements of a list must be implicitly convertible to the type of the first element, which here is '%s'. This element has type '%s'. - (Originally from FSComp.txt:22) - - - - - Identifiers containing '@' are reserved for use in F# code generation - (Originally from FSComp.txt:984) - - - - - The identifier '%s' is reserved for future use by F# - (Originally from FSComp.txt:985) - - - - - Unexpected syntax or possible incorrect indentation: this token is offside of context started at position %s. Try indenting this further.\nTo continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - (Originally from FSComp.txt:1001) - - - - - The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. - (Originally from FSComp.txt:1002) - - - - - The indentation of this 'in' token is incorrect with respect to the corresponding 'let' - (Originally from FSComp.txt:1000) - - - - - Syntax error. Wrong nested #endif, unexpected tokens before it. - (Originally from FSComp.txt:1052) - - - - - The interpolated string contains unmatched closing braces. - (Originally from FSComp.txt:1130) - - - - - Unexpected character '%s' - (Originally from FSComp.txt:1021) - - - - - Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression. - (Originally from FSComp.txt:1621) - - - - - The interpolated triple quoted string literal does not start with enough '$' characters to allow this many consecutive '%%' characters. - (Originally from FSComp.txt:1131) - - - - - The interpolated triple quoted string literal does not start with enough '$' characters to allow this many consecutive opening braces as content. - (Originally from FSComp.txt:1129) - - - - - This token is reserved for future use - (Originally from FSComp.txt:1042) - - - - - This Unicode encoding is only valid in string literals - (Originally from FSComp.txt:1041) - - - - - TABs are not allowed in F# code unless the #indent \"off\" option is used - (Originally from FSComp.txt:1043) - - - - - Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal. - (Originally from FSComp.txt:1620) - - - - - A '}' character must be escaped (by doubling) in an interpolated string. - (Originally from FSComp.txt:1629) - - - - - This number is outside the allowable range for 32-bit unsigned integers - (Originally from FSComp.txt:1030) - - - - - This number is outside the allowable range for 32-bit signed integers - (Originally from FSComp.txt:1029) - - - - - This number is outside the allowable range for 64-bit unsigned integers - (Originally from FSComp.txt:1032) - - - - - This number is outside the allowable range for 64-bit signed integers - (Originally from FSComp.txt:1031) - - - - - This number is outside the allowable range for 16-bit unsigned integers - (Originally from FSComp.txt:1028) - - - - - This number is outside the allowable range for 16-bit signed integers - (Originally from FSComp.txt:1027) - - - - - This number is outside the allowable range for unsigned native integers - (Originally from FSComp.txt:1034) - - - - - This number is outside the allowable range for signed native integers - (Originally from FSComp.txt:1033) - - - - - This number is outside the allowable range for this integer type - (Originally from FSComp.txt:1016) - - - - - This number is outside the allowable range for 8-bit unsigned integers - (Originally from FSComp.txt:1026) - - - - - This number is outside the allowable range for hexadecimal 8-bit signed integers - (Originally from FSComp.txt:1025) - - - - - This number is outside the allowable range for 8-bit signed integers - (Originally from FSComp.txt:1024) - - - - - This number is outside the allowable range for 32-bit floats - (Originally from FSComp.txt:1037) - - - - - This number is outside the allowable range for decimal literals - (Originally from FSComp.txt:1036) - - - - - \U%s is not a valid Unicode character escape sequence - (Originally from FSComp.txt:1126) - - - - - This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0o1, 0b1, 1l (int/int32), 1u (uint/uint32), 1L (int64), 1UL (uint64), 1s (int16), 1us (uint16), 1y (int8/sbyte), 1uy (uint8/byte), 1.0 (float/double), 1.0f (float32/single), 1.0m (decimal), 1I (bigint). - (Originally from FSComp.txt:1038) - - - - - Invalid line number: '%s' - (Originally from FSComp.txt:1044) - - - - - This is not a valid identifier - (Originally from FSComp.txt:1707) - - - - - Invalid floating point number - (Originally from FSComp.txt:1035) - - - - - This is not a valid character literal - (Originally from FSComp.txt:1040) - - - - - This is not a valid byte literal - (Originally from FSComp.txt:1039) - - - - - Consider using a file with extension '.ml' or '.mli' instead - (Originally from FSComp.txt:1102) - - - - - IF-FSHARP/IF-CAML regions are no longer supported - (Originally from FSComp.txt:1103) - - - - - Identifiers followed by '%s' are reserved for future use - (Originally from FSComp.txt:1023) - - - - - #if directive should be immediately followed by an identifier - (Originally from FSComp.txt:1051) - - - - - #if directive must appear as the first non-whitespace character on a line - (Originally from FSComp.txt:1045) - - - - - #endif has no matching #if - (Originally from FSComp.txt:1049) - - - - - #endif required for #else - (Originally from FSComp.txt:1047) - - - - - #endif directive must appear as the first non-whitespace character on a line - (Originally from FSComp.txt:1050) - - - - - #else has no matching #if - (Originally from FSComp.txt:1046) - - - - - #else directive must appear as the first non-whitespace character on a line - (Originally from FSComp.txt:1048) - - - - - #! may only appear as the first line at the start of a file. - (Originally from FSComp.txt:1053) - - - - - Extended string interpolation is not supported in this version of F#. - (Originally from FSComp.txt:1132) - - - - - '%s' is not permitted as a character in operator names and is reserved for future use - (Originally from FSComp.txt:1020) - - - - - a byte string may not be interpolated - (Originally from FSComp.txt:1623) - - - - - This byte array literal contains characters that do not encode as a single byte - (Originally from FSComp.txt:1022) - - - - - Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. - (Originally from FSComp.txt:1477) - - - - - Used in a sequence expression to produce a value for a sequence. - (Originally from FSComp.txt:1476) - - - - - Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. - (Originally from FSComp.txt:1475) - - - - - Used in computation expressions to introduce a looping construct where the condition is the result of another computation expression. - (Originally from FSComp.txt:1474) - - - - - Introduces a looping construct. - (Originally from FSComp.txt:1473) - - - - - Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. - (Originally from FSComp.txt:1472) - - - - - Indicates the .NET void type. Used when interoperating with other .NET languages. - (Originally from FSComp.txt:1471) - - - - - Used in a signature to indicate a value, or in a type to declare a member, in limited situations. - (Originally from FSComp.txt:1470) - - - - - Used instead of let! in computation expressions for computation expression results that implement IDisposable. - (Originally from FSComp.txt:1469) - - - - - Used instead of let for values that implement IDisposable - (Originally from FSComp.txt:1468) - - - - - Used to convert to a type that is higher in the inheritance chain. - (Originally from FSComp.txt:1467) - - - - - Delimits a untyped code quotation. - (Originally from FSComp.txt:1483) - - - - - Delimits a typed code quotation. - (Originally from FSComp.txt:1482) - - - - - Used to check if an object is of the given type in a pattern or binding. - (Originally from FSComp.txt:1466) - - - - - Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. - (Originally from FSComp.txt:1465) - - - - - Used to introduce a block of code that might generate an exception. Used together with with or finally. - (Originally from FSComp.txt:1464) - - - - - Used as a Boolean literal. - (Originally from FSComp.txt:1425) - - - - - Used in for loops to indicate a range. - (Originally from FSComp.txt:1463) - - - - - Used in conditional expressions. Also used to perform side effects after object construction. - (Originally from FSComp.txt:1462) - - - - - Used to declare a structure type. Also used in generic parameter constraints. - (Originally from FSComp.txt:1461) - - - - - Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. - (Originally from FSComp.txt:1460) - - - - - Keyword reserved for ML-compatibility. - (Originally from FSComp.txt:1459) - - - - - Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. - (Originally from FSComp.txt:1458) - - - - - In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions - (Originally from FSComp.txt:1478) - - - - - Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. - (Originally from FSComp.txt:1457) - - - - - Used to provide a value for the result of the containing computation expression. - (Originally from FSComp.txt:1456) - - - - - Used to indicate that a function is recursive. - (Originally from FSComp.txt:1455) - - - - - Allows access to a member from outside the type. - (Originally from FSComp.txt:1454) - - - - - Restricts access to a member to code in the same type or module. - (Originally from FSComp.txt:1453) - - - - - Used to implement a version of an abstract or virtual method that differs from the base version. - (Originally from FSComp.txt:1452) - - - - - Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. - (Originally from FSComp.txt:1451) - - - - - Used to make the contents of a namespace or module available without qualification. - (Originally from FSComp.txt:1450) - - - - - Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. - (Originally from FSComp.txt:1449) - - - - - Indicates the absence of an object. Also used in generic parameter constraints. - (Originally from FSComp.txt:1448) - - - - - Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. - (Originally from FSComp.txt:1447) - - - - - Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. - (Originally from FSComp.txt:1446) - - - - - Used to associate a name with a group of related types and modules, to logically separate it from other code. - (Originally from FSComp.txt:1445) - - - - - Used to declare a variable, that is, a value that can be changed. - (Originally from FSComp.txt:1444) - - - - - Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. - (Originally from FSComp.txt:1443) - - - - - Used to declare a property or method in an object type. - (Originally from FSComp.txt:1442) - - - - - Used in computation expressions to pattern match directly over the result of another computation expression. - (Originally from FSComp.txt:1441) - - - - - Used to branch by comparing a value to a pattern. - (Originally from FSComp.txt:1440) - - - - - Used in computation expressions to bind a name to the result of another computation expression. - (Originally from FSComp.txt:1439) - - - - - Used to associate, or bind, a name to a value or function. - (Originally from FSComp.txt:1438) - - - - - Assigns a value to a variable. - (Originally from FSComp.txt:1479) - - - - - Used to specify a computation that is to be performed only when a result is needed. - (Originally from FSComp.txt:1437) - - - - - Used to specify that a member is visible inside an assembly but not outside it. - (Originally from FSComp.txt:1436) - - - - - Used to declare and implement interfaces. - (Originally from FSComp.txt:1435) - - - - - Used to indicate a function that should be integrated directly into the caller's code. - (Originally from FSComp.txt:1434) - - - - - Used to specify a base class or base interface. - (Originally from FSComp.txt:1433) - - - - - Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - (Originally from FSComp.txt:1432) - - - - - Used in conditional branching constructs. - (Originally from FSComp.txt:1431) - - - - - Used to reference the top-level .NET namespace. - (Originally from FSComp.txt:1430) - - - - - Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. - (Originally from FSComp.txt:1429) - - - - - Used in lambda expressions, also known as anonymous functions. - (Originally from FSComp.txt:1428) - - - - - Used in looping constructs. - (Originally from FSComp.txt:1427) - - - - - Used together with try to introduce a block of code that executes regardless of whether an exception occurs. - (Originally from FSComp.txt:1426) - - - - - Indicates that a declared program element is defined in another binary or assembly. - (Originally from FSComp.txt:1424) - - - - - Used to declare an exception type. - (Originally from FSComp.txt:1423) - - - - - In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. - (Originally from FSComp.txt:1422) - - - - - Used in conditional branching. - (Originally from FSComp.txt:1421) - - - - - Used in conditional branching. A short form of else if. - (Originally from FSComp.txt:1420) - - - - - Converts a type to a type that is lower in the hierarchy. - (Originally from FSComp.txt:1481) - - - - - In a for expression, used when counting in reverse. - (Originally from FSComp.txt:1419) - - - - - Used to convert to a type that is lower in the inheritance chain. - (Originally from FSComp.txt:1418) - - - - - In verbose syntax, indicates the end of a block of code in a looping expression. - (Originally from FSComp.txt:1417) - - - - - Used in looping constructs or to execute imperative code. - (Originally from FSComp.txt:1416) - - - - - Used to declare a delegate. - (Originally from FSComp.txt:1415) - - - - - Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. - (Originally from FSComp.txt:1414) - - - - - Keyword to specify a constant literal as a type parameter argument in Type Providers. - (Originally from FSComp.txt:1413) - - - - - In verbose syntax, indicates the start of a class definition. - (Originally from FSComp.txt:1412) - - - - - Converts a type to type that is higher in the hierarchy. - (Originally from FSComp.txt:1480) - - - - - In verbose syntax, indicates the start of a code block. - (Originally from FSComp.txt:1411) - - - - - Used as the name of the base class object. - (Originally from FSComp.txt:1410) - - - - - Used to verify code during debugging. - (Originally from FSComp.txt:1409) - - - - - Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. - (Originally from FSComp.txt:1408) - - - - - Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - (Originally from FSComp.txt:1407) - - - - - Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. - (Originally from FSComp.txt:1406) - - - - - %s '%s' not found in type '%s' from assembly '%s'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. - (Originally from FSComp.txt:1485) - - - - - %s '%s' not found in assembly '%s'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. - (Originally from FSComp.txt:1484) - - - - - XML comment is not placed on a valid language element. - (Originally from FSComp.txt:1675) - - - - - The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. - (Originally from FSComp.txt:1321) - - - - - invalid namespace for provided type - (Originally from FSComp.txt:1217) - - - - - invalid full name for provided type - (Originally from FSComp.txt:1218) - - - - - Invalid provided literal value '%s' - (Originally from FSComp.txt:1320) - - - - - This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. - (Originally from FSComp.txt:1497) - - - - - This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. - (Originally from FSComp.txt:1496) - - - - - The 'InlineIfLambda' attribute is present in the signature but not the implementation. - (Originally from FSComp.txt:1673) - - - - - The type '%s' is required here and is unavailable. You must add a reference to assembly '%s'. - (Originally from FSComp.txt:988) - - - - - A reference to the type '%s' in assembly '%s' was found, but the type could not be found in that assembly - (Originally from FSComp.txt:989) - - - - - A reference to the DLL %s is required by assembly %s. The imported type %s is located in the first assembly and could not be resolved. - (Originally from FSComp.txt:991) - - - - - Internal error or badly formed metadata: not enough type parameters were in scope while importing - (Originally from FSComp.txt:990) - - - - - Invalid number of generic arguments to type '%s' in provided type. Expected '%d' arguments, given '%d'. - (Originally from FSComp.txt:1297) - - - - - Invalid value unit-of-measure parameter '%s' - (Originally from FSComp.txt:1299) - - - - - Invalid value '%s' for unit-of-measure parameter '%s' - (Originally from FSComp.txt:1298) - - - - - An imported assembly uses the type '%s' but that type is not public - (Originally from FSComp.txt:992) - - - - - Invalid argument to 'methodhandleof' during codegen - (Originally from FSComp.txt:1259) - - - - - The resumable code construct '%s' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. - (Originally from FSComp.txt:1650) - - - - - Unknown debug point '%s'. The available debug points are '%s'. - (Originally from FSComp.txt:1661) - - - - - Unexpected error creating debug information file '%s' - (Originally from FSComp.txt:1015) - - - - - The file '%s' changed on disk unexpectedly, please reload. - (Originally from FSComp.txt:1498) - - - - - Compiler error: unexpected unrealized value - (Originally from FSComp.txt:834) - - - - - Unexpected GetSet annotation on a property - (Originally from FSComp.txt:837) - - - - - Undefined value '%s' - (Originally from FSComp.txt:821) - - - - - This type cannot be used for a literal field - (Originally from FSComp.txt:836) - - - - - The StructLayout attribute could not be decoded - (Originally from FSComp.txt:839) - - - - - GenSetStorage: %s was represented as a static method but was not an appropriate lambda expression - (Originally from FSComp.txt:832) - - - - - The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. - (Originally from FSComp.txt:829) - - - - - RSA key expected - (Originally from FSComp.txt:1141) - - - - - Private key expected - (Originally from FSComp.txt:1140) - - - - - No signature directory - (Originally from FSComp.txt:1146) - - - - - Invalid signature size - (Originally from FSComp.txt:1145) - - - - - Invalid RSAParameters structure - '{0}' expected - (Originally from FSComp.txt:1143) - - - - - Invalid Public Key blob - (Originally from FSComp.txt:1147) - - - - - Invalid Magic value in CLR Header - (Originally from FSComp.txt:1138) - - - - - Invalid bit Length - (Originally from FSComp.txt:1142) - - - - - Invalid algId - 'Exponent' expected - (Originally from FSComp.txt:1144) - - - - - Bad image format - (Originally from FSComp.txt:1139) - - - - - Reflected definitions cannot contain uses of the prefix splice operator '%%' - (Originally from FSComp.txt:841) - - - - - Mutable variables cannot escape their method - (Originally from FSComp.txt:833) - - - - - The MarshalAs attribute could not be decoded - (Originally from FSComp.txt:828) - - - - - Main module of program is empty: nothing will happen when it is run - (Originally from FSComp.txt:835) - - - - - Literal fields cannot be set - (Originally from FSComp.txt:831) - - - - - Label %s not found - (Originally from FSComp.txt:822) - - - - - Incorrect number of type arguments to local call - (Originally from FSComp.txt:823) - - - - - The FieldOffset attribute could not be decoded - (Originally from FSComp.txt:838) - - - - - The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) - (Originally from FSComp.txt:1106) - - - - - The type '%s' has been marked as having an Explicit layout, but the field '%s' has not been marked with the 'FieldOffset' attribute - (Originally from FSComp.txt:1097) - - - - - Dynamic invocation of %s is not supported - (Originally from FSComp.txt:824) - - - - - The DllImport attribute could not be decoded - (Originally from FSComp.txt:830) - - - - - The DefaultAugmentation attribute could not be decoded - (Originally from FSComp.txt:840) - - - - - Custom marshallers cannot be specified in F# code. Consider using a C# helper function. - (Originally from FSComp.txt:827) - - - - - This operation involves taking the address of a value '%s' represented using a local variable or other special representation. This is invalid. - (Originally from FSComp.txt:826) - - - - - Taking the address of a literal field is invalid - (Originally from FSComp.txt:825) - - - - - The 'if' expression needs to return a tuple of length %d of type\n %s \nto satisfy context type requirements. It currently returns a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:28) - - - - - The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'. - (Originally from FSComp.txt:27) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - Invalid directive '#%s %s' - (Originally from FSComp.txt:1536) - - - - - Cannot find FSharp.Core.dll in compiler's directory - (Originally from FSComp.txt:1374) - - - - - Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. - (Originally from FSComp.txt:1153) - - - - - Exiting - too many errors - (Originally from FSComp.txt:1149) - - - - - System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. - (Originally from FSComp.txt:1356) - - - - - Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). - (Originally from FSComp.txt:1172) - - - - - Static linking may not include a mixed managed/unmanaged DLL - (Originally from FSComp.txt:1157) - - - - - Static linking may not include a .EXE - (Originally from FSComp.txt:1156) - - - - - Passing a .resx file (%s) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. - (Originally from FSComp.txt:1171) - - - - - The resident compilation service was not used because a problem occured in communicating with the server. - (Originally from FSComp.txt:1169) - - - - - The assembly '%s' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. - (Originally from FSComp.txt:1168) - - - - - Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. - (Originally from FSComp.txt:1155) - - - - - The code in assembly '%s' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. - (Originally from FSComp.txt:1154) - - - - - A problem occurred writing the binary '%s': %s - (Originally from FSComp.txt:1162) - - - - - No implementation files specified - (Originally from FSComp.txt:1151) - - - - - Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module - (Originally from FSComp.txt:1167) - - - - - Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module - (Originally from FSComp.txt:1166) - - - - - The key file '%s' could not be opened - (Originally from FSComp.txt:1161) - - - - - Ignoring mixed managed/unmanaged assembly '%s' during static linking - (Originally from FSComp.txt:1158) - - - - - Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module - (Originally from FSComp.txt:1165) - - - - - The attribute %s specified version '%s', but this value is invalid and has been ignored - (Originally from FSComp.txt:1152) - - - - - Assembly '%s' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. - (Originally from FSComp.txt:1159) - - - - - An %s specified version '%s', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. - (Originally from FSComp.txt:1173) - - - - - The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option - (Originally from FSComp.txt:1163) - - - - - Assembly '%s' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. - (Originally from FSComp.txt:1160) - - - - - Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' - (Originally from FSComp.txt:1164) - - - - - The 'from the end slicing' feature requires language version 'preview'. - (Originally from FSComp.txt:1527) - - - - - - %s - (Originally from FSComp.txt:1544) - - - - - Prefix flag (' ' or '+') set twice - (Originally from FSComp.txt:233) - - - - - Precision missing after the '.' - (Originally from FSComp.txt:238) - - - - - Positional specifiers are not permitted in format strings - (Originally from FSComp.txt:230) - - - - - The '%%A' format specifier may not be used in an assembly being compiled with option '--reflectionfree'. This construct implicitly uses reflection. - (Originally from FSComp.txt:245) - - - - - Missing format specifier - (Originally from FSComp.txt:231) - - - - - The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - (Originally from FSComp.txt:241) - - - - - The # formatting modifier is invalid in F# - (Originally from FSComp.txt:234) - - - - - 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. - (Originally from FSComp.txt:242) - - - - - Interpolated strings used as type IFormattable or type FormattableString may not use '%%' specifiers, only .NET-style interpolands such as '{expr}', '{expr,3}' or '{expr:N5}' may be used. - (Originally from FSComp.txt:1617) - - - - - The '%%P' specifier may not be used explicitly. - (Originally from FSComp.txt:1616) - - - - - .NET-style format specifiers such as '{x,3}' or '{x:N5}' may not be mixed with '%%' format specifiers. - (Originally from FSComp.txt:1615) - - - - - Interpolated strings may not use '%%' format specifiers unless each is given an expression, e.g. '%%d{1+1}'. - (Originally from FSComp.txt:1614) - - - - - '%s' format does not support precision - (Originally from FSComp.txt:239) - - - - - '%s' flag set twice - (Originally from FSComp.txt:232) - - - - - '%s' format does not support '0' flag - (Originally from FSComp.txt:237) - - - - - '%s' does not support prefix '%s' flag - (Originally from FSComp.txt:243) - - - - - Bad width in format specifier - (Originally from FSComp.txt:236) - - - - - Bad precision in format specifier - (Originally from FSComp.txt:235) - - - - - Bad format specifier: '%s' - (Originally from FSComp.txt:244) - - - - - Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - (Originally from FSComp.txt:240) - - - - - All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length %d of type\n %s \nThis branch returns a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:32) - - - - - All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is '%s'. This branch returns a value of type '%s'. - (Originally from FSComp.txt:31) - - - - - The record, struct or class field '%s' is not accessible from this code location - (Originally from FSComp.txt:976) - - - - - witness passing for trait constraints in F# quotations - (Originally from FSComp.txt:1560) - - - - - wild card in for loop - (Originally from FSComp.txt:1546) - - - - - 'while!' expression - (Originally from FSComp.txt:1588) - - - - - Raises warnings when multiple record type matches were found during name resolution because of overlapping field names. - (Originally from FSComp.txt:1583) - - - - - Raises warnings when 'let inline ... =' is used together with [<MethodImpl(MethodImplOptions.NoInlining)>] attribute. Function is not getting inlined. - (Originally from FSComp.txt:1574) - - - - - Raises warnings when an copy-and-update record expression changes all fields of a record. - (Originally from FSComp.txt:1578) - - - - - Interop between C#'s and F#'s unmanaged generic constraint (emit additional modreq) - (Originally from FSComp.txt:1723) - - - - - Support for try-with in sequence expressions - (Originally from FSComp.txt:1577) - - - - - struct representation for active patterns - (Originally from FSComp.txt:1562) - - - - - string interpolation - (Originally from FSComp.txt:1559) - - - - - Raises errors on incorrect indentation, allows better recovery and analysis during editing - (Originally from FSComp.txt:1585) - - - - - Static members in interfaces - (Originally from FSComp.txt:1579) - - - - - Allow static let bindings in union, record, struct, non-incremental-class types - (Originally from FSComp.txt:1711) - - - - - single underscore pattern - (Originally from FSComp.txt:1545) - - - - - self type constraints - (Originally from FSComp.txt:1567) - - - - - resumable state machines - (Originally from FSComp.txt:1556) - - - - - support for required properties - (Originally from FSComp.txt:1568) - - - - - whitespace relaxation v2 - (Originally from FSComp.txt:1563) - - - - - whitespace relexation - (Originally from FSComp.txt:1547) - - - - - informational messages related to reference cells - (Originally from FSComp.txt:1251) - - - - - list literals of any size - (Originally from FSComp.txt:1564) - - - - - binary formatting for integers - (Originally from FSComp.txt:1249) - - - - - prefer String.GetPinnableReference in fixed bindings - (Originally from FSComp.txt:1590) - - - - - package management - (Originally from FSComp.txt:1552) - - - - - overloads for custom operations - (Originally from FSComp.txt:1247) - - - - - open type declaration - (Originally from FSComp.txt:1550) - - - - - nullable optional interop - (Originally from FSComp.txt:1557) - - - - - non-variable patterns to the right of 'as' patterns - (Originally from FSComp.txt:1253) - - - - - String values marked as literals and IL constants as printf format - (Originally from FSComp.txt:1580) - - - - - Nested record field copy-and-update - (Originally from FSComp.txt:1581) - - - - - nameof - (Originally from FSComp.txt:1548) - - - - - Pattern match discard is not allowed for union case that takes no data. - (Originally from FSComp.txt:1571) - - - - - ML compatibility revisions - (Originally from FSComp.txt:1255) - - - - - Allow lowercase DU when RequireQualifiedAccess attribute - (Originally from FSComp.txt:1570) - - - - - interfaces with multiple generic instantiation - (Originally from FSComp.txt:1597) - - - - - static abstract interface members - (Originally from FSComp.txt:1566) - - - - - support for consuming init properties - (Originally from FSComp.txt:1569) - - - - - Diagnostic 3559 (warn when obj inferred) at informational level, off by default - (Originally from FSComp.txt:1710) - - - - - expr[idx] notation for indexing and slicing - (Originally from FSComp.txt:1250) - - - - - Improved implied argument names - (Originally from FSComp.txt:1584) - - - - - implicit yield - (Originally from FSComp.txt:1549) - - - - - from-end slicing - (Originally from FSComp.txt:1553) - - - - - fixed-index slice 3d/4d - (Originally from FSComp.txt:1554) - - - - - Extended string interpolation similar to C# raw string literals. - (Originally from FSComp.txt:1582) - - - - - extended fixed bindings for byref and GetPinnableReference - (Originally from FSComp.txt:1589) - - - - - more types support units of measure - (Originally from FSComp.txt:1248) - - - - - Escapes curly braces before calling FormattableStringFactory.Create when interpolated string literal is typed as FormattableString - (Originally from FSComp.txt:1694) - - - - - Error reporting on static classes - (Originally from FSComp.txt:1576) - - - - - give error on deprecated access of construct with RequireQualifiedAccess attribute - (Originally from FSComp.txt:1565) - - - - - Raises errors for non-virtual members overrides - (Originally from FSComp.txt:1573) - - - - - dotless float32 literal - (Originally from FSComp.txt:1551) - - - - - discard pattern in use binding - (Originally from FSComp.txt:1252) - - - - - fix to resolution of delegate type names, see https://github.com/dotnet/fsharp/issues/10228 - (Originally from FSComp.txt:1257) - - - - - default interface member consumption - (Originally from FSComp.txt:1558) - - - - - Constraint intersection on flexible types - (Originally from FSComp.txt:1586) - - - - - Raises warnings if a member or function has the 'TailCall' attribute, but is not being used in a tail recursive way. - (Originally from FSComp.txt:1587) - - - - - Allow implicit Extension attribute on declaring types, modules - (Originally from FSComp.txt:1572) - - - - - automatic generation of 'Message' property for 'exception' declarations - (Originally from FSComp.txt:1256) - - - - - attributes to the right of the 'module' keyword - (Originally from FSComp.txt:1254) - - - - - Arithmetic and logical operations in literals, enum definitions and attributes - (Originally from FSComp.txt:1575) - - - - - applicative computation expressions - (Originally from FSComp.txt:1555) - - - - - additional type-directed conversions - (Originally from FSComp.txt:1561) - - - - - underscore dot shorthand for accessor only function - (Originally from FSComp.txt:1718) - - - - - Expression does not have a name. - (Originally from FSComp.txt:1521) - - - - - This construct is experimental - (Originally from FSComp.txt:978) - - - - - The event '%s' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit %s and %s methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. - (Originally from FSComp.txt:971) - - - - - Unsupported expression '%s' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. - (Originally from FSComp.txt:1196) - - - - - Invalid member '%s' on provided type '%s'. Only properties, methods and constructors are allowed - (Originally from FSComp.txt:1188) - - - - - Unsupported constant type '%s'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. - (Originally from FSComp.txt:1195) - - - - - Unknown static argument kind '%s' when resolving a reference to a provided type or method '%s' - (Originally from FSComp.txt:1214) - - - - - Unexpected 'null' return value from provided type '%s' member '%s' - (Originally from FSComp.txt:1209) - - - - - Unexpected exception from provided type '%s' member '%s': %s - (Originally from FSComp.txt:1194) - - - - - Unexpected exception from member '%s' of provided type '%s' member '%s': %s - (Originally from FSComp.txt:1210) - - - - - The type provider constructor has thrown an exception: %s - (Originally from FSComp.txt:1220) - - - - - Too many static parameters. Expected at most %d parameters, but got %d unnamed and %d named parameters. - (Originally from FSComp.txt:1319) - - - - - The static parameter '%s' of the provided type or method '%s' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '%s<%s=...>'. - (Originally from FSComp.txt:1240) - - - - - The static parameter '%s' has already been given a value - (Originally from FSComp.txt:1242) - - - - - The type provider returned 'null', which is not a valid return value from '%s' - (Originally from FSComp.txt:1219) - - - - - Assembly attribute '%s' refers to a designer assembly '%s' which cannot be loaded or doesn't exist. The exception reported was: %s - %s - (Originally from FSComp.txt:1200) - - - - - Assembly attribute '%s' refers to a designer assembly '%s' which cannot be loaded from path '%s'. The exception reported was: %s - %s - (Originally from FSComp.txt:1201) - - - - - The type provider designer assembly '%s' could not be loaded from folder '%s'. The exception reported was: %s - %s - (Originally from FSComp.txt:1216) - - - - - The type provider designer assembly '%s' could not be loaded from folder '%s' because a dependency was missing or could not loaded. All dependencies of the type provider designer assembly must be located in the same folder as that assembly. The exception reported was: %s - %s - (Originally from FSComp.txt:1215) - - - - - The type provider '%s' reported an error in the context of provided type '%s', member '%s'. The error: %s - (Originally from FSComp.txt:1233) - - - - - The type provider '%s' reported an error: %s - (Originally from FSComp.txt:1203) - - - - - The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. - (Originally from FSComp.txt:1202) - - - - - The '%s' of a provided type was null or empty. - (Originally from FSComp.txt:1235) - - - - - An exception occurred when accessing the '%s' of a provided type: %s - (Originally from FSComp.txt:1234) - - - - - A reference to a provided type was missing a value for the static parameter '%s'. You may need to recompile one or more referenced assemblies. - (Originally from FSComp.txt:1260) - - - - - A reference to a provided type had an invalid value '%s' for a static parameter. You may need to recompile one or more referenced assemblies. - (Originally from FSComp.txt:1261) - - - - - Expected provided type with path '%s' but provided type has path '%s' - (Originally from FSComp.txt:1208) - - - - - Expected provided type named '%s' but provided type has 'Name' with value '%s' - (Originally from FSComp.txt:1197) - - - - - The type provider '%s' returned an invalid type from 'ApplyStaticArguments'. A type with name '%s' was expected, but a type with name '%s' was returned. - (Originally from FSComp.txt:1222) - - - - - The type provider '%s' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '%s' was expected, but a method with name '%s' was returned. - (Originally from FSComp.txt:1223) - - - - - Property '%s' on provided type '%s' is neither readable nor writable as it has CanRead=false and CanWrite=false - (Originally from FSComp.txt:1300) - - - - - Property '%s' on provided type '%s' has CanWrite=false but GetSetMethod() returned a method - (Originally from FSComp.txt:1192) - - - - - Property '%s' on provided type '%s' has CanRead=false but GetGetMethod() returned a method - (Originally from FSComp.txt:1190) - - - - - Property '%s' on provided type '%s' has CanWrite=true but there was no value from GetSetMethod() - (Originally from FSComp.txt:1191) - - - - - Property '%s' on provided type '%s' has CanRead=true but there was no value from GetGetMethod() - (Originally from FSComp.txt:1189) - - - - - One or more errors seen during provided type setup - (Originally from FSComp.txt:1193) - - - - - Type provider '%s' returned null from GetInvokerExpression. - (Originally from FSComp.txt:1221) - - - - - The provided type '%s' returned a member with a null or empty member name - (Originally from FSComp.txt:1178) - - - - - The provided type '%s' has member '%s' which has declaring type '%s'. Expected declaring type to be the same as provided type. - (Originally from FSComp.txt:1181) - - - - - The provided type '%s' member info '%s' has null declaring type - (Originally from FSComp.txt:1180) - - - - - The provided type '%s' returned a null member - (Originally from FSComp.txt:1179) - - - - - No static parameter exists with name '%s' - (Originally from FSComp.txt:1241) - - - - - Nested provided types do not take static arguments or generic parameters - (Originally from FSComp.txt:1211) - - - - - Provided type '%s' has 'IsGenericType' as true, but generic types are not supported. - (Originally from FSComp.txt:1185) - - - - - Provided type '%s' has 'IsArray' as true, but array types are not supported. - (Originally from FSComp.txt:1186) - - - - - Multiple static parameters exist with name '%s' - (Originally from FSComp.txt:1243) - - - - - This provided method requires static parameters - (Originally from FSComp.txt:1376) - - - - - Invalid member '%s' on provided type '%s'. Provided type members must be public, and not be generic, virtual, or abstract. - (Originally from FSComp.txt:1187) - - - - - Assembly '%s' hase TypeProviderAssembly attribute with invalid value '%s'. The value should be a valid assembly name - (Originally from FSComp.txt:1228) - - - - - Invalid static argument to provided type. Expected an argument of kind '%s'. - (Originally from FSComp.txt:1212) - - - - - The type provider '%s' provided a method with a name '%s' and metadata token '%d', which is not reported among its methods of its declaring type '%s' - (Originally from FSComp.txt:1205) - - - - - The type provider '%s' provided a constructor which is not reported among the constructors of its declaring type '%s' - (Originally from FSComp.txt:1206) - - - - - The type provider '%s' used an invalid parameter in the ParameterExpression: %s - (Originally from FSComp.txt:1204) - - - - - Character '%s' is not allowed in provided type name '%s' - (Originally from FSComp.txt:1236) - - - - - Character '%s' is not allowed in provided namespace name '%s' - (Originally from FSComp.txt:1177) - - - - - Referenced assembly '%s' has assembly level attribute '%s' but no public type provider classes were found - (Originally from FSComp.txt:1182) - - - - - Event '%s' on provided type '%s' has no value from GetRemoveMethod() - (Originally from FSComp.txt:1199) - - - - - Event '%s' on provided type '%s' has no value from GetAddMethod() - (Originally from FSComp.txt:1198) - - - - - An error occured applying the static arguments to a provided type - (Originally from FSComp.txt:1213) - - - - - An error occured applying the static arguments to a provided method - (Originally from FSComp.txt:1359) - - - - - The provider '%s' returned a non-generated type '%s' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. - (Originally from FSComp.txt:1323) - - - - - Type '%s' from type provider '%s' has an empty namespace. Use 'null' for the global namespace. - (Originally from FSComp.txt:1183) - - - - - Empty namespace found from the type provider '%s'. Use 'null' for the global namespace. - (Originally from FSComp.txt:1184) - - - - - A direct reference to the generated type '%s' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. - (Originally from FSComp.txt:1207) - - - - - Named static arguments must come after all unnamed static arguments - (Originally from FSComp.txt:1239) - - - - - A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid - (Originally from FSComp.txt:1358) - - - - - Erased to - (Originally from FSComp.txt:1328) - - - - - All branches of an 'if' expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length %d of type\n %s \nThis branch returns a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:30) - - - - - All branches of an 'if' expression must return values implicitly convertible to the type of the first branch, which here is '%s'. This branch returns a value of type '%s'. - (Originally from FSComp.txt:29) - - - - - System.Environment.Exit did not exit - (Originally from FSComp.txt:246) - - - - - The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined - (Originally from FSComp.txt:247) - - - - - The documentation file has no .xml suffix - (Originally from FSComp.txt:1150) - - - - - is - (Originally from FSComp.txt:1486) - - - - - (description unavailable...) - (Originally from FSComp.txt:1335) - - - - - The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. - (Originally from FSComp.txt:35) - - - - - Delegates are not allowed to have curried signatures - (Originally from FSComp.txt:981) - - - - - %s var in collection - (Originally from FSComp.txt:1266) - - - - - %s var in collection %s (outerKey = innerKey). Note that parentheses are required after '%s' - (Originally from FSComp.txt:1264) - - - - - %s var in collection %s (outerKey = innerKey) into group. Note that parentheses are required after '%s' - (Originally from FSComp.txt:1265) - - - - - The constraints 'unmanaged' and 'not struct' are inconsistent - (Originally from FSComp.txt:324) - - - - - None of the types '%s' support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from FSComp.txt:318) - - - - - None of the types '%s' support the operator '%s' - (Originally from FSComp.txt:316) - - - - - This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. - (Originally from FSComp.txt:336) - - - - - The type '%s' is not compatible with any of the types %s, arising from the use of a printf-style format string - (Originally from FSComp.txt:339) - - - - - The type '%s' is not a CLI enum type - (Originally from FSComp.txt:333) - - - - - The type '%s' is not a CLI delegate type - (Originally from FSComp.txt:335) - - - - - Type instantiation length mismatch - (Originally from FSComp.txt:344) - - - - - Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. - (Originally from FSComp.txt:311) - - - - - The type '%s' has a non-standard delegate type - (Originally from FSComp.txt:334) - - - - - The type '%s' does not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from FSComp.txt:319) - - - - - The type '%s' does not support the operator '%s' - (Originally from FSComp.txt:317) - - - - - The type '%s' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality - (Originally from FSComp.txt:332) - - - - - The type '%s' does not support the 'equality' constraint because it is a function type - (Originally from FSComp.txt:331) - - - - - The type '%s' does not support the 'equality' constraint because it has the 'NoEquality' attribute - (Originally from FSComp.txt:330) - - - - - The type '%s' does not support a conversion to the type '%s' - (Originally from FSComp.txt:320) - - - - - The type '%s' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison - (Originally from FSComp.txt:329) - - - - - The type '%s' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface - (Originally from FSComp.txt:328) - - - - - The type '%s' does not support the 'comparison' constraint because it has the 'NoComparison' attribute - (Originally from FSComp.txt:327) - - - - - The type '%s' does not have 'null' as a proper value - (Originally from FSComp.txt:325) - - - - - The declared type parameter '%s' cannot be used here since the type parameter cannot be resolved at compile time - (Originally from FSComp.txt:309) - - - - - The constraints 'struct' and 'not struct' are inconsistent - (Originally from FSComp.txt:323) - - - - - The required signature is %s - (Originally from FSComp.txt:357) - - - - - Argument '%s' doesn't match - (Originally from FSComp.txt:383) - - - - - Argument at index %d doesn't match - (Originally from FSComp.txt:384) - - - - - Optional arguments not permitted here - (Originally from FSComp.txt:345) - - - - - The type '%s' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. - (Originally from FSComp.txt:326) - - - - - Known type parameter: %s - (Originally from FSComp.txt:377) - - - - - Known type parameters: %s - (Originally from FSComp.txt:378) - - - - - Known return type: %s - (Originally from FSComp.txt:379) - - - - - Known type of argument: %s - (Originally from FSComp.txt:375) - - - - - Known types of arguments: %s - (Originally from FSComp.txt:376) - - - - - No overloads match for method '%s'. - (Originally from FSComp.txt:374) - - - - - No %s member or object constructor named '%s' takes %d arguments. The named argument '%s' doesn't correspond to any argument or settable return property for any overload. - (Originally from FSComp.txt:372) - - - - - No %s member or object constructor named '%s' takes %d arguments. Note the call to this member also provides %d named arguments. - (Originally from FSComp.txt:371) - - - - - No %s member or object constructor named '%s' takes %d arguments - (Originally from FSComp.txt:370) - - - - - Method or object constructor '%s' not found - (Originally from FSComp.txt:373) - - - - - A unique overload for method '%s' could not be determined based on type information prior to this program point. A type annotation may be needed. - (Originally from FSComp.txt:380) - - - - - %s is not an instance method - (Originally from FSComp.txt:354) - - - - - %s is not a static method - (Originally from FSComp.txt:353) - - - - - The type '%s' has a method '%s' (full name '%s'), but the method is static - (Originally from FSComp.txt:321) - - - - - The type '%s' has a method '%s' (full name '%s'), but the method is not static - (Originally from FSComp.txt:322) - - - - - This method expects a CLI '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 - (Originally from FSComp.txt:350) - - - - - The member or object constructor '%s' takes %d type argument(s) but is here given %d. The required signature is '%s'. - (Originally from FSComp.txt:366) - - - - - 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'. - (Originally from FSComp.txt:362) - - - - - The member or object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - (Originally from FSComp.txt:363) - - - - - The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. Some names for missing arguments are %s. - (Originally from FSComp.txt:361) - - - - - The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. Some names for missing arguments are %s. - (Originally from FSComp.txt:360) - - - - - The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. - (Originally from FSComp.txt:359) - - - - - The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. - (Originally from FSComp.txt:358) - - - - - The member or object constructor '%s' does not take %d argument(s). An overload was found taking %d arguments. - (Originally from FSComp.txt:369) - - - - - A member or object constructor '%s' taking %d arguments is not accessible from this code location. All accessible versions of method '%s' take %d arguments. - (Originally from FSComp.txt:367) - - - - - %s is not a static member - (Originally from FSComp.txt:346) - - - - - %s is not an instance member - (Originally from FSComp.txt:347) - - - - - The member or object constructor '%s' is not %s. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. - (Originally from FSComp.txt:352) - - - - - The member or object constructor '%s' is not %s - (Originally from FSComp.txt:351) - - - - - The member or object constructor '%s' has no argument or settable return property '%s'. %s. - (Originally from FSComp.txt:355) - - - - - This indexer expects %d arguments but is here given %d - (Originally from FSComp.txt:313) - - - - - Incorrect generic instantiation. No %s member named '%s' takes %d generic arguments. - (Originally from FSComp.txt:368) - - - - - A generic construct requires that the type '%s' is an unmanaged type - (Originally from FSComp.txt:338) - - - - - A generic construct requires that the type '%s' is a CLI or F# struct type - (Originally from FSComp.txt:337) - - - - - A generic construct requires that a generic type parameter be known as a struct or reference type. Consider adding a type annotation. - (Originally from FSComp.txt:343) - - - - - A generic construct requires that the type '%s' have reference semantics, but it does not, i.e. it is a struct - (Originally from FSComp.txt:340) - - - - - A generic construct requires that the type '%s' have a public default constructor - (Originally from FSComp.txt:342) - - - - - A generic construct requires that the type '%s' be non-abstract - (Originally from FSComp.txt:341) - - - - - Expected arguments to an instance member - (Originally from FSComp.txt:312) - - - - - Expecting a type supporting the operator '%s' but given a tuple type - (Originally from FSComp.txt:315) - - - - - Expecting a type supporting the operator '%s' but given a function type. You may be missing an argument to a function. - (Originally from FSComp.txt:314) - - - - - The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). - (Originally from FSComp.txt:365) - - - - - The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - (Originally from FSComp.txt:364) - - - - - The object constructor '%s' has no argument or settable return property '%s'. %s. - (Originally from FSComp.txt:356) - - - - - 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 '_'. - (Originally from FSComp.txt:310) - - - - - Candidates:\n%s - (Originally from FSComp.txt:381) - - - - - Available overloads:\n%s - (Originally from FSComp.txt:382) - - - - - The argument types don't match - (Originally from FSComp.txt:349) - - - - - Argument length mismatch - (Originally from FSComp.txt:348) - - - - - Quotations cannot contain expressions that set union case fields - (Originally from FSComp.txt:301) - - - - - Quotations cannot contain expressions that set fields in exception values - (Originally from FSComp.txt:302) - - - - - Quotations cannot contain expressions that require byref pointers - (Originally from FSComp.txt:303) - - - - - Quotations cannot contain expressions that fetch union case indexes - (Originally from FSComp.txt:300) - - - - - Quotations cannot contain this kind of type - (Originally from FSComp.txt:308) - - - - - Quotations cannot contain this kind of pattern match - (Originally from FSComp.txt:306) - - - - - Quotations cannot contain this kind of constant - (Originally from FSComp.txt:305) - - - - - Quotations cannot contain expressions that fetch static fields - (Originally from FSComp.txt:297) - - - - - Quotations cannot contain object expressions - (Originally from FSComp.txt:295) - - - - - Quotations cannot contain inline assembly code or pattern matching on arrays - (Originally from FSComp.txt:298) - - - - - Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. - (Originally from FSComp.txt:294) - - - - - Quotations cannot contain uses of generic expressions - (Originally from FSComp.txt:293) - - - - - Quotations cannot contain descending for loops - (Originally from FSComp.txt:299) - - - - - Quotations cannot contain array pattern matching - (Originally from FSComp.txt:307) - - - - - Quotations cannot contain expressions that take the address of a field - (Originally from FSComp.txt:296) - - - - - Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call - (Originally from FSComp.txt:304) - - - - - A quotation may not involve an assignment to or taking the address of a captured local variable - (Originally from FSComp.txt:1325) - - - - - Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. - (Originally from FSComp.txt:1117) - - - - - 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. - (Originally from FSComp.txt:292) - - - - - The dependency manager extension %s could not be loaded. Message: %s - (Originally from FSComp.txt:1520) - - - - - Key container signing is not supported on this platform. - (Originally from FSComp.txt:1646) - - - - - The 'AssemblyKeyNameAttribute' has been deprecated. Use 'AssemblyKeyFileAttribute' instead. - (Originally from FSComp.txt:1645) - - - - - The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. - (Originally from FSComp.txt:1378) - - - - - The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. - (Originally from FSComp.txt:1377) - - - - - A ';' is used to separate field values in records. Consider replacing ',' with ';'. - (Originally from FSComp.txt:34) - - - - - The variable '%s' is used in an invalid way - (Originally from FSComp.txt:251) - - - - - 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 - (Originally from FSComp.txt:290) - - - - - The value '%s' is unused - (Originally from FSComp.txt:1068) - - - - - The recursive object reference '%s' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. - (Originally from FSComp.txt:1069) - - - - - default augmentation of the union case - (Originally from FSComp.txt:276) - - - - - compiled form of the union case - (Originally from FSComp.txt:275) - - - - - The type '%s' is less accessible than the value, member or type '%s' it is used in. - (Originally from FSComp.txt:252) - - - - - A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. - (Originally from FSComp.txt:1336) - - - - - 'System.Void' can only be used as 'typeof<System.Void>' in F# - (Originally from FSComp.txt:253) - - - - - Struct members cannot return the address of fields of the struct by reference - (Originally from FSComp.txt:1507) - - - - - Expression-splicing operators may only be used within quotations - (Originally from FSComp.txt:256) - - - - - A method return type would contain byrefs which is not permitted - (Originally from FSComp.txt:268) - - - - - [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%%' - (Originally from FSComp.txt:273) - - - - - 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. - (Originally from FSComp.txt:248) - - - - - The property '%s' has the same name as a method in type '%s'. - (Originally from FSComp.txt:277) - - - - - The property '%s' has the same name as another property in type '%s', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. - (Originally from FSComp.txt:279) - - - - - The member or function '%s' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way. - (Originally from FSComp.txt:1715) - - - - - This value can't be assigned because the target '%s' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. - (Originally from FSComp.txt:1504) - - - - - The Span or IsByRefLike variable '%s' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1509) - - - - - A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1510) - - - - - ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter - (Originally from FSComp.txt:1111) - - - - - First-class uses of the expression-splicing operator are not permitted - (Originally from FSComp.txt:257) - - - - - First-class uses of the 'reraise' function is not permitted - (Originally from FSComp.txt:259) - - - - - Using the 'nameof' operator as a first-class function value is not permitted. - (Originally from FSComp.txt:1522) - - - - - First-class uses of the address-of operators are not permitted - (Originally from FSComp.txt:258) - - - - - Type '%s' is illegal because in byref<T>, T cannot contain byref types. - (Originally from FSComp.txt:1308) - - - - - The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1508) - - - - - The type abbreviation contains byrefs. This is not permitted by F#. - (Originally from FSComp.txt:291) - - - - - The byref typed value '%s' cannot be used at this point - (Originally from FSComp.txt:260) - - - - - A byref typed value would be stored here. Top-level let-bound byref values are not permitted. - (Originally from FSComp.txt:272) - - - - - The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1503) - - - - - The address of the variable '%s' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1388) - - - - - The address of the static field '%s' cannot be used at this point - (Originally from FSComp.txt:264) - - - - - The address of the variable '%s' cannot be used at this point - (Originally from FSComp.txt:263) - - - - - The address of an array element cannot be used at this point - (Originally from FSComp.txt:266) - - - - - The address of the field '%s' cannot be used at this point - (Originally from FSComp.txt:265) - - - - - This type implements the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#. - (Originally from FSComp.txt:289) - - - - - 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. - (Originally from FSComp.txt:271) - - - - - 'base' values may only be used to make direct calls to the base implementations of overridden members - (Originally from FSComp.txt:261) - - - - - The function or method has an invalid return type '%s'. This is not permitted by the rules of Common IL. - (Originally from FSComp.txt:1525) - - - - - The parameter '%s' has an invalid type '%s'. This is not permitted by the rules of Common IL. - (Originally from FSComp.txt:1524) - - - - - Invalid custom attribute value (not a constant or literal) - (Originally from FSComp.txt:269) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Instance members are not allowed. - (Originally from FSComp.txt:1698) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Instance let bindings are not allowed. - (Originally from FSComp.txt:1699) - - - - - The use of 'incr' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'incr cell' to 'cell.Value <- cell.Value + 1'. - (Originally from FSComp.txt:1612) - - - - - The use of '!' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change '!cell' to 'cell.Value'. - (Originally from FSComp.txt:1610) - - - - - The use of 'decr' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'decr cell' to 'cell.Value <- cell.Value - 1'. - (Originally from FSComp.txt:1613) - - - - - The use of ':=' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'cell := expr' to 'cell.Value <- expr'. - (Originally from FSComp.txt:1611) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Implementing interfaces is not allowed. - (Originally from FSComp.txt:1700) - - - - - The property '%s' of type '%s' has a getter and a setter that do not match. If one is abstract then the other must be as well. - (Originally from FSComp.txt:278) - - - - - A property's getter and setter must have the same type. Property '%s' has getter of type '%s' but setter of type '%s'. - (Originally from FSComp.txt:1345) - - - - - The type of a first-class function cannot contain byrefs - (Originally from FSComp.txt:267) - - - - - Feature '%s' requires the F# library for language version %s or greater. - (Originally from FSComp.txt:1532) - - - - - Feature '%s' is not supported by target runtime. - (Originally from FSComp.txt:1534) - - - - - Feature '%s' is not available in F# %s. Please use language version %s or greater. - (Originally from FSComp.txt:1533) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Explicit field declarations are not allowed. - (Originally from FSComp.txt:1702) - - - - - A type instantiation involves a byref type. This is not permitted by the rules of Common IL. - (Originally from FSComp.txt:254) - - - - - Calls to 'reraise' may only occur directly in a handler of a try-with - (Originally from FSComp.txt:255) - - - - - A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. - (Originally from FSComp.txt:274) - - - - - Duplicate parameter. The parameter '%s' has been used more that once in this method. - (Originally from FSComp.txt:1693) - - - - - Duplicate property. The property '%s' has the same name and signature as another property in type '%s' once tuples, functions, units of measure and/or provided types are erased. - (Originally from FSComp.txt:286) - - - - - Duplicate property. The property '%s' has the same name and signature as another property in type '%s'. - (Originally from FSComp.txt:285) - - - - - Duplicate method. The method '%s' has the same name and signature as another method in type '%s' once tuples, functions, units of measure and/or provided types are erased. - (Originally from FSComp.txt:282) - - - - - Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. - (Originally from FSComp.txt:288) - - - - - Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type. - (Originally from FSComp.txt:287) - - - - - The method '%s' has curried arguments but has the same name as another method in type '%s'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. - (Originally from FSComp.txt:283) - - - - - Duplicate method. The method '%s' has the same name and signature as another method in type '%s'. - (Originally from FSComp.txt:281) - - - - - Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments - (Originally from FSComp.txt:284) - - - - - This expression is an anonymous record, use {|...|} instead of {...}. - (Originally from FSComp.txt:1724) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Constructor with arguments is not allowed. - (Originally from FSComp.txt:1696) - - - - - A type would store a byref typed value. This is not permitted by Common IL. - (Originally from FSComp.txt:280) - - - - - The byref-typed variable '%s' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. - (Originally from FSComp.txt:249) - - - - - The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. - (Originally from FSComp.txt:250) - - - - - FSharp.Core.AutoOpenAttribute should not be aliased. - (Originally from FSComp.txt:1705) - - - - - The attribute type '%s' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. - (Originally from FSComp.txt:270) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Additional constructor is not allowed. - (Originally from FSComp.txt:1697) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Abstract member declarations are not allowed. - (Originally from FSComp.txt:1701) - - - - - Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments. - (Originally from FSComp.txt:1367) - - - - - Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. - (Originally from FSComp.txt:1366) - - - - - Type inference caused the type variable %s to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. - (Originally from FSComp.txt:1365) - - - - - Lowercase literal '%s' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. - (Originally from FSComp.txt:1368) - - - - - The operator '%s' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from FSComp.txt:1339) - - - - - Unrecognized option: '%s'. Use '--help' to learn about recognized command line options. - (Originally from FSComp.txt:79) - - - - - The non-generic type '%s' does not expect any type arguments, but here is given %d type argument(s) - (Originally from FSComp.txt:36) - - - - - Filename '%s' contains invalid character '%s' - (Originally from FSComp.txt:1115) - - - - - The signature file '%s' 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. - (Originally from FSComp.txt:76) - - - - - A signature for the file or module '%s' has already been specified - (Originally from FSComp.txt:73) - - - - - The search directory '%s' could not be found - (Originally from FSComp.txt:50) - - - - - Problem with filename '%s': %s - (Originally from FSComp.txt:46) - - - - - Problem reading assembly '%s': %s - (Originally from FSComp.txt:1332) - - - - - The '--pdb' option requires the '--debug' option to be used - (Originally from FSComp.txt:48) - - - - - Option requires parameter: %s - (Originally from FSComp.txt:60) - - - - - No inputs specified - (Originally from FSComp.txt:47) - - - - - This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. - (Originally from FSComp.txt:59) - - - - - Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. - (Originally from FSComp.txt:57) - - - - - Invalid warning number '%s' - (Originally from FSComp.txt:43) - - - - - Invalid version string '%s' - (Originally from FSComp.txt:44) - - - - - Invalid version file '%s' - (Originally from FSComp.txt:45) - - - - - The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx or .fsscript - (Originally from FSComp.txt:63) - - - - - The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx or .fsscript. To enable the deprecated use of .ml or .mli extensions, use '--langversion:5.0' and '--mlcompatibility'. - (Originally from FSComp.txt:64) - - - - - The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. - (Originally from FSComp.txt:62) - - - - - The search directory '%s' is invalid - (Originally from FSComp.txt:49) - - - - - Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private' - (Originally from FSComp.txt:53) - - - - - Invalid module or namespace name - (Originally from FSComp.txt:80) - - - - - Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. - (Originally from FSComp.txt:71) - - - - - Invalid directive. Expected '#r \"<file-or-assembly>\"'. - (Originally from FSComp.txt:69) - - - - - Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. - (Originally from FSComp.txt:70) - - - - - Invalid directive. Expected '#I \"<path>\"'. - (Originally from FSComp.txt:68) - - - - - '%s' is not a valid filename - (Originally from FSComp.txt:51) - - - - - '%s' is not a valid assembly name - (Originally from FSComp.txt:52) - - - - - 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. - (Originally from FSComp.txt:56) - - - - - An implementation of file or module '%s' 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. - (Originally from FSComp.txt:74) - - - - - An implementation of the file or module '%s' has already been given - (Originally from FSComp.txt:75) - - - - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. - (Originally from FSComp.txt:1113) - - - - - File '%s' not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. - (Originally from FSComp.txt:1114) - - - - - Error opening binary file '%s': %s - (Originally from FSComp.txt:66) - - - - - The source file '%s' (at position %d/%d) already appeared in the compilation list (at position %d/%d). Please verify that it is included only once in the project file. - (Originally from FSComp.txt:1695) - - - - - Directives inside modules are ignored - (Originally from FSComp.txt:72) - - - - - The F#-compiled DLL '%s' needs to be recompiled to be used with this version of F# - (Originally from FSComp.txt:67) - - - - - Could not resolve assembly '%s' - (Originally from FSComp.txt:65) - - - - - Source file '%s' could not be found - (Originally from FSComp.txt:61) - - - - - The file extensions '.ml' and '.mli' are for ML compatibility - (Originally from FSComp.txt:1101) - - - - - Unable to read assembly '%s' - (Originally from FSComp.txt:54) - - - - - Assembly resolution failure at or near this location - (Originally from FSComp.txt:55) - - - - - '%s' is not a valid integer argument - (Originally from FSComp.txt:77) - - - - - '%s' is not a valid floating point argument - (Originally from FSComp.txt:78) - - - - - A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes - (Originally from FSComp.txt:222) - - - - - The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes - (Originally from FSComp.txt:221) - - - - - The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute - (Originally from FSComp.txt:220) - - - - - A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - (Originally from FSComp.txt:224) - - - - - Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes - (Originally from FSComp.txt:223) - - - - - The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. - (Originally from FSComp.txt:217) - - - - - The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute - (Originally from FSComp.txt:219) - - - - - A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes - (Originally from FSComp.txt:227) - - - - - A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes - (Originally from FSComp.txt:228) - - - - - This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' - (Originally from FSComp.txt:218) - - - - - A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - (Originally from FSComp.txt:225) - - - - - The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes - (Originally from FSComp.txt:229) - - - - - A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' - (Originally from FSComp.txt:226) - - - - - Error while parsing embedded IL type - (Originally from FSComp.txt:214) - - - - - Error while parsing embedded IL - (Originally from FSComp.txt:213) - - - - - Invalid expression on left of assignment - (Originally from FSComp.txt:216) - - - - - This indexer notation has been removed from the F# language - (Originally from FSComp.txt:215) - - - - - All elements of an array must be implicitly convertible to the type of the first element, which here is a tuple of length %d of type\n %s \nThis element is a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:25) - - - - - All elements of an array must be implicitly convertible to the type of the first element, which here is '%s'. This element has type '%s'. - (Originally from FSComp.txt:24) - - - - - Interpolated string contains untyped identifiers. Adding typed format specifiers is recommended. - (Originally from FSComp.txt:1725) - - - - - Add . for indexer access. - (Originally from FSComp.txt:21) - - - - - Active pattern '%s' is not a function - (Originally from FSComp.txt:1104) - - - - - Active pattern '%s' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x' - (Originally from FSComp.txt:1105) - - - - - The mutable local '%s' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. - (Originally from FSComp.txt:1357) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is virtual and the other isn't - (Originally from FSComp.txt:122) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe types differ - (Originally from FSComp.txt:114) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is static and the other isn't - (Originally from FSComp.txt:121) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member - (Originally from FSComp.txt:127) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe respective type parameter counts differ - (Originally from FSComp.txt:113) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is marked as an override and the other isn't - (Originally from FSComp.txt:125) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. - (Originally from FSComp.txt:112) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a constructor/property and the other is not - (Originally from FSComp.txt:126) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from FSComp.txt:106) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe literal constant values and/or attributes differ - (Originally from FSComp.txt:111) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member - (Originally from FSComp.txt:128) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe inline flags differ - (Originally from FSComp.txt:110) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe number of generic parameters in the signature and implementation differ (the signature declares %s but the implementation declares %s - (Originally from FSComp.txt:117) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. - (Originally from FSComp.txt:118) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is final and the other isn't - (Originally from FSComp.txt:124) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is an extension member and the other is not - (Originally from FSComp.txt:115) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe CLI member names differ - (Originally from FSComp.txt:120) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe display names differ - (Originally from FSComp.txt:108) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled names differ - (Originally from FSComp.txt:107) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe mutability attributes differ - (Originally from FSComp.txt:105) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nAn arity was not inferred for this value - (Originally from FSComp.txt:116) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe arities in the signature and implementation differ. The signature specifies that '%s' is function definition or lambda expression accepting at least %s 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 %s: int -> (int -> int)\ninstead of\n\tval %s: int -> int -> int. - (Originally from FSComp.txt:119) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe accessibility specified in the signature is more than that specified in the implementation - (Originally from FSComp.txt:109) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is abstract and the other isn't - (Originally from FSComp.txt:123) - - - - - The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe types of the fields differ - (Originally from FSComp.txt:163) - - - - - The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from FSComp.txt:161) - - - - - The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe respective number of data fields differ - (Originally from FSComp.txt:162) - - - - - The module contains the constructor\n %s \nbut its signature specifies\n %s \nthe accessibility specified in the signature is more than that specified in the implementation - (Originally from FSComp.txt:164) - - - - - Invalid recursive reference to an abstract slot - (Originally from FSComp.txt:970) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe types differ - (Originally from FSComp.txt:170) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'static' modifiers differ - (Originally from FSComp.txt:167) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from FSComp.txt:165) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'mutable' modifiers differ - (Originally from FSComp.txt:168) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'literal' modifiers differ - (Originally from FSComp.txt:169) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nthe accessibility specified in the signature is more than that specified in the implementation - (Originally from FSComp.txt:166) - - - - - The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:188) - - - - - The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s - (Originally from FSComp.txt:185) - - - - - The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:192) - - - - - The exception definitions are not compatible because the field '%s' was required by the signature but was not specified by the implementation. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:190) - - - - - The exception definitions are not compatible because the field '%s' was present in the implementation but not in the signature. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:191) - - - - - The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:189) - - - - - The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s - (Originally from FSComp.txt:186) - - - - - The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:187) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the types have different base types - (Originally from FSComp.txt:141) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because a type representation is being hidden by a signature - (Originally from FSComp.txt:147) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the types are of different kinds - (Originally from FSComp.txt:148) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not - (Originally from FSComp.txt:136) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not - (Originally from FSComp.txt:135) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. - (Originally from FSComp.txt:140) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature defines the %s '%s' but the implementation does not (or does, but not in the same order) - (Originally from FSComp.txt:143) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature declares a %s while the implementation declares a %s - (Originally from FSComp.txt:157) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not - (Originally from FSComp.txt:160) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the representations differ - (Originally from FSComp.txt:150) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the respective type parameter counts differ - (Originally from FSComp.txt:130) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the number of %ss differ - (Originally from FSComp.txt:142) - - - - - The %s definitions in the signature and implementation are not compatible because the names differ. The type is called '%s' in the signature file but '%s' in implementation. - (Originally from FSComp.txt:129) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature requires that the type supports the interface %s but the interface has not been implemented - (Originally from FSComp.txt:132) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. - (Originally from FSComp.txt:137) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not - (Originally from FSComp.txt:134) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not - (Originally from FSComp.txt:133) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. - (Originally from FSComp.txt:138) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. - (Originally from FSComp.txt:139) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation - (Originally from FSComp.txt:145) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation defines the %s '%s' but the signature does not (or does, but not in the same order) - (Originally from FSComp.txt:144) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the IL representations differ - (Originally from FSComp.txt:149) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the field %s was present in the implementation but not in the signature - (Originally from FSComp.txt:151) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the field %s was required by the signature but was not specified by the implementation - (Originally from FSComp.txt:153) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation - (Originally from FSComp.txt:152) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because 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'. - (Originally from FSComp.txt:154) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature - (Originally from FSComp.txt:146) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation - (Originally from FSComp.txt:131) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the abstract member '%s' was present in the implementation but not in the signature - (Originally from FSComp.txt:156) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the abstract member '%s' was required by the signature but was not specified by the implementation - (Originally from FSComp.txt:155) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the abbreviations differ: %s versus %s - (Originally from FSComp.txt:158) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. - (Originally from FSComp.txt:159) - - - - - The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. - (Originally from FSComp.txt:1390) - - - - - The CallerMemberNameAttribute applied to parameter '%s' will have no effect. It is overridden by the CallerFilePathAttribute. - (Originally from FSComp.txt:1385) - - - - - Stopped due to error\n - (Originally from Interactive\FSIstrings.txt:2) - - - - - Prevents references from being locked by the F# Interactive process - (Originally from Interactive\FSIstrings.txt:55) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - Use the given file on startup as initial input - (Originally from Interactive\FSIstrings.txt:11) - - - - - Usage: %s <options> [script.fsx [<arguments>]] - (Originally from Interactive\FSIstrings.txt:3) - - - - - - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... - (Originally from Interactive\FSIstrings.txt:50) - - - - - --> Timing now on - (Originally from Interactive\FSIstrings.txt:48) - - - - - --> Timing now off - (Originally from Interactive\FSIstrings.txt:49) - - - - - Real: %s, CPU: %s, GC %s - (Originally from Interactive\FSIstrings.txt:25) - - - - - gen - (Originally from Interactive\FSIstrings.txt:26) - - - - - Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs - (Originally from Interactive\FSIstrings.txt:13) - - - - - Support TAB completion in console (on by default) - (Originally from Interactive\FSIstrings.txt:18) - - - - - Suppress fsi writing to stdout - (Originally from Interactive\FSIstrings.txt:17) - - - - - F# Interactive for F# %s - (Originally from Interactive\FSIstrings.txt:54) - - - - - Microsoft (R) F# Interactive version %s - (Originally from Interactive\FSIstrings.txt:53) - - - - - Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpDiagnostic use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing - (Originally from Interactive\FSIstrings.txt:57) - - - - - Operation could not be completed due to earlier error - (Originally from Interactive\FSIstrings.txt:56) - - - - - Emit multiple assemblies (on by default) - (Originally from Interactive\FSIstrings.txt:58) - - - - - - MISCELLANEOUS - - (Originally from Interactive\FSIstrings.txt:8) - - - - - Loading - (Originally from Interactive\FSIstrings.txt:39) - - - - - #load the given file on startup - (Originally from Interactive\FSIstrings.txt:12) - - - - - Warning: line too long, ignoring some characters\n - (Originally from Interactive\FSIstrings.txt:24) - - - - - - LANGUAGE - - (Originally from Interactive\FSIstrings.txt:7) - - - - - '%s' is not a valid assembly name - (Originally from Interactive\FSIstrings.txt:22) - - - - - See '%s' for options - (Originally from Interactive\FSIstrings.txt:38) - - - - - F# Interactive command line options: - (Originally from Interactive\FSIstrings.txt:37) - - - - - F# Interactive directives: - (Originally from Interactive\FSIstrings.txt:28) - - - - - Toggle timing on/off - (Originally from Interactive\FSIstrings.txt:33) - - - - - Reference (dynamically load) the given DLL - (Originally from Interactive\FSIstrings.txt:29) - - - - - Exit - (Originally from Interactive\FSIstrings.txt:35) - - - - - Load the given file(s) as if compiled and referenced - (Originally from Interactive\FSIstrings.txt:32) - - - - - Display help - (Originally from Interactive\FSIstrings.txt:34) - - - - - Clear screen - (Originally from Interactive\FSIstrings.txt:36) - - - - - Add the given search path for referenced DLLs - (Originally from Interactive\FSIstrings.txt:30) - - - - - Include package source uri when searching for packages - (Originally from Interactive\FSIstrings.txt:31) - - - - - \n- Interrupt\n - (Originally from Interactive\FSIstrings.txt:40) - - - - - - INPUT FILES - - (Originally from Interactive\FSIstrings.txt:4) - - - - - Display this usage message (Short form: -?) - (Originally from Interactive\FSIstrings.txt:14) - - - - - Execute interactions on a Windows Forms event loop (on by default) - (Originally from Interactive\FSIstrings.txt:16) - - - - - Failed to resolve assembly '%s' - (Originally from Interactive\FSIstrings.txt:51) - - - - - \n- Exit...\n - (Originally from Interactive\FSIstrings.txt:41) - - - - - Exit fsi after loading the files or running the .fsx script given on the command line - (Originally from Interactive\FSIstrings.txt:15) - - - - - Exception raised when starting remoting server.\n%s - (Originally from Interactive\FSIstrings.txt:10) - - - - - \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: %s\n - (Originally from Interactive\FSIstrings.txt:27) - - - - - - ERRORS AND WARNINGS - - (Originally from Interactive\FSIstrings.txt:6) - - - - - Functions with [<EntryPoint>] are not invoked in FSI. '%s' was not invoked. Execute '%s <args>' in order to invoke '%s' with the appropriate string array of command line arguments. - (Originally from Interactive\FSIstrings.txt:59) - - - - - Emit debug information in quotations - (Originally from Interactive\FSIstrings.txt:19) - - - - - Directory '%s' doesn't exist - (Originally from Interactive\FSIstrings.txt:23) - - - - - --> Referenced '%s' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - (Originally from Interactive\FSIstrings.txt:46) - - - - - --> Referenced '%s' (file may be locked by F# Interactive process) - (Originally from Interactive\FSIstrings.txt:45) - - - - - --> Referenced '%s' - (Originally from Interactive\FSIstrings.txt:44) - - - - - --> Added '%s' to library include path - (Originally from Interactive\FSIstrings.txt:47) - - - - - Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t%s - (Originally from Interactive\FSIstrings.txt:43) - - - - - 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'. - (Originally from Interactive\FSIstrings.txt:21) - - - - - - CODE GENERATION - - (Originally from Interactive\FSIstrings.txt:5) - - - - - Binding session to '%s'... - (Originally from Interactive\FSIstrings.txt:52) - - - - - For help type #help;; - (Originally from Interactive\FSIstrings.txt:20) - - - - - - ADVANCED - - (Originally from Interactive\FSIstrings.txt:9) - - - - - - Aborting main thread... - (Originally from Interactive\FSIstrings.txt:42) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - %s for F# %s - (Originally from Facilities\UtilsStrings.txt:2) - - - - - Microsoft (R) F# Compiler version %s - (Originally from Facilities\UtilsStrings.txt:1) - - - - - 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 <c>ArgumentException</c> is - raised.. - - - - - 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. - - - - - Return an array containing the given element. - - - - - Like <c>foldBack</c>, but return both the intermediary and final results. - - - - - Like <c>fold</c>, but return the intermediary and final results. - - - - - 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 <c>ArgumentException</c> is - raised. - - - - - 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 <c>ArgumentException</c> is raised. - - - - - Return True if the given array is empty, otherwise False. - - - - - Test elements of the two arrays pairwise to see if all pairs of elements satisfy the given predicate. - Raise <c>ArgumentException</c> if the arrays have different lengths. - - - - - 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 <c>ArgumentException</c> 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 <c>ArgumentException</c> is - raised. - - - - - Apply a function to each element of the array, threading an accumulator argument - through the computation. If the input function is <c>f</c> and the elements are <c>i0...iN</c> then - computes <c>f i0 (...(f iN-1 iN))</c>. 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 <c>f</c> and the elements are <c>i0...iN</c> - then computes <c>f (... (f i0 i1)...) iN</c>. Raises ArgumentException if the array has size zero. - - - - - Return the index of the first element in the array - that satisfies the given predicate. Raise <c>KeyNotFoundException</c> if - none of the elements satisfy the predicate. - - - - - Return the index of the first element in the array - that satisfies the given predicate. Raise <c>KeyNotFoundException</c> if - none of the elements satisfy the predicate. - - - - - 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. - - - - - Return a view of the array as an enumerable object. - - - - - Build a <c>ResizeArray</c> from the given elements. - - - - - Return a fixed-length array containing the elements of the input <c>ResizeArray</c>. - - - - - Sort the elements using the key extractor and generic comparison on the keys. - - - - - Sort the elements using the given comparison function. - - - - - Return a new array with the elements in reverse order. - - - - - Apply the given function to successive elements, returning the first - result where function returns Some(x) for some x. - - - - - Return the first element for which the given function returns True. - Return None if no such element exists. - - - - - Return the first element for which the given function returns True. - Raise <c>KeyNotFoundException</c> if no such element exists. - - - - - 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 <c>Some(x)</c>. - - - - - Split the collection into two collections, containing the - elements for which the given predicate returns True and False - respectively. - - - - - Return a new collection containing only the elements of the collection - for which the given predicate returns True. - - - - - Test if all elements of the array satisfy the given predicate. - If the input function is <c>f</c> and the elements are <c>i0...iN</c> and "j0...jN" - then computes <c>p i0 && ... && p iN</c>. - - - - - Test if any element of the array satisfies the given predicate. - If the input function is <c>f</c> and the elements are <c>i0...iN</c> - then computes <c>p i0 or ... or p iN</c>. - - - - - 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. - - - - - Apply the given function to each element of the array. 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 the corresponding elements of the two collections pairwise. The two input - arrays must have the same lengths. - - - - - Apply the given function to two arrays simultaneously. The - two arrays must have the same lengths, otherwise an Invalid_argument exception is - raised. - - - - - Build a new array whose elements are the results of applying the given function - to each of the elements of the array. - - - - - Apply the given function to each element of the array. - - - - - Apply a function to each element of the array, threading an accumulator argument - through the computation. If the input function is <c>f</c> and the elements are <c>i0...iN</c> then - computes <c>f i0 (...(f iN s))</c>. - - - - - Apply a function to each element of the collection, threading an accumulator argument - through the computation. If the input function is <c>f</c> and the elements are <c>i0...iN</c> - then computes <c>f (... (f s i0)...) iN</c> - - - - - Build an array from the given list. - - - - - Build a list from the given array. - - - - - Read a range of elements from the first array and write them into the second. - - - - - Fill a range of the collection with the given element. - - - - - Build a new array that contains the elements of the given array. - - - - - Build a new array that contains the given subrange specified by - starting index and length. - - - - - 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 first array followed by the elements of the second array. - - - - - Create an array by calling the given generator on each index. - - - - - Create an array whose elements are all initially the given value. - - - - - Set the value of an element in the collection. You can also use the syntax <c>arr.[idx] <- e</c>. - - - - - Fetch an element from the collection. You can also use the syntax <c>arr.[idx]</c>. - - - - - Return the length of the collection. You can also use property <c>arr.Length</c>. - - - - - Generic operations on the type System.Collections.Generic.List, which is called ResizeArray in the F# libraries. - - - - - Calculates the edit distance between two strings. - The edit distance is a metric that allows to measure the amount of difference between two strings - and shows how many edit operations (insert, delete, substitution) are needed to transform one string into the other. - - - - - Calculates the Jaro-Winkler edit distance between two strings. - The edit distance is a metric that allows to measure the amount of similarity between two strings. - - - - - Lookup or set the given element in the table. Set replaces all existing bindings for a value with a single - bindings. Raise <c>KeyNotFoundException</c> 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 <c>KeyNotFoundException</c> 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. - - - - - Clear all elements from the collection. - - - - - Add a binding for the element to the table. - - - - - Build a map that contains the bindings of the given IEnumerable. - - - - - Create a new empty mutable HashMultiMap with an internal bucket array of the given approximate size - and with the given key hash/equality functions. - - - - - Create a new empty mutable HashMultiMap with the given key hash/equality functions. - - - - - Hash tables, by default based on F# structural "hash" and (=) functions. - The table may map a single key to multiple bindings. - - - - - Maps with a specific comparison function - - - - - Sets with a specific comparison function - - - - - Get the value for the given key or <c>None</c> if not still valid. Skips `areSame` checking unless `areSimilar` is not provided. - - - - - Get the value for the given key or None, but only if entry is still valid. Skips `areSame` checking unless `areSimilar` is not provided. - - - - - Get the value for the given key or <c>None</c> if not still valid. - - - - - Get the value for the given key or None, but only if entry is still valid - - - - - Set the given key. - - - - - Resize - - - - - Remove the given value from the mru cache. - - - - - Get the similar (subsumable) value for the given key or <c>None</c> if not already available. - - - - - Clear out the cache. - - - - - 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. - - Concurrency: This collection is thread-safe, though concurrent use may result in different - threads seeing different live sets of cached items. - - - areSimilar: Keep at most once association for two similar keys (as given by areSimilar) - - - - - Lookup the value without making it the most recent. - Returns the original key value because the areSame function - may have unified two different keys. - - - - - Lookup a value and make it the most recent. - Returns the original key value because the areSame function - may have unified two different keys. - - - - - Lookup a value and make it the most recent. Return <c>None</c> if it wasn't there. - - - - - Resize - - - - - Remove the given value from the collection. - - - - - Add an element to the collection. Make it the most recent. - - - - - Remove all elements. - - - - - 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. - - - areSimilar: Keep at most once association for two similar keys (as given by areSimilar) - - - - - Iterable functional collection with O(1) append-1 time. Useful for data structures where elements get added at the - end but the collection must occasionally be iterated. Iteration is slower and may allocate because - a suffix of elements is stored in reverse order. - - The type doesn't support structural hashing or comparison. - - - - - Lookup an element in the map. Raise <c>KeyNotFoundException</c> 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 another for 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 <c>IEnumerable</c> - 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. Keys are ordered by construction function specified - when creating empty maps or by F# structural comparison if no - construction function is specified. - - <performance> - 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. - </performance> - Immutable maps. A constraint tag carries information about the class of key-comparers being used. - - - - - 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 <c>Set.isEmpty</c>. See the <c>Set</c> 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 <c>Set.remove</c>. 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 <c>Set</c> module for further operations on sets. - - - - - Build two new sets, one containing the elements for which the given predicate returns True, - and another with 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 <c>Set.contains</c>. See the <c>Set</c> 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 <c>Set.add</c>. 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 <c>Set</c> module for further operations on sets. - - - - - Immutable sets based on binary trees, default tag - Immutable sets where a constraint tag carries information about the class of key-comparer being used. - - - - - Immutable map collection, with explicit flattening to a backing dictionary - - - - - Interface that defines methods for comparing objects using partial equality relation - - - - - 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 - - - - - A thread-safe lookup table which is assigning an auto-increment stamp with each insert - - - - - Memoize tables (all entries cached, never collected unless whole table is collected) - - - - - Generates unique stamps - - - - - Represents a synchronous, cold-start, cancellable computation with explicit representation of a cancelled result. - - A cancellable computation may be cancelled via a CancellationToken, which is propagated implicitly. - If cancellation occurs, it is propagated as data rather than by raising an OperationCanceledException. - - - - - Encapsulates a lock associated with a particular token-type representing the acquisition of that lock. - - - - - A base type for various types of tokens that must be passed when a lock is taken. - Each different static lock should declare a new subtype of this type. - - - - - Represents a token that indicates execution on any of several potential user threads calling the F# compiler services. - - - - - Represents a token that indicates execution on the compilation thread, i.e. - - we have full access to the (partially mutable) TAST and TcImports data structures - - compiler execution may result in type provider invocations when resolving types and members - - we can access various caches in the SourceCodeServices - - Like other execution tokens this should be passed via argument passing and not captured/stored beyond - the lifetime of stack-based calls. This is not checked, it is a discipline within the compiler code. - - - - - Represents a permission active at this point in execution - - - - - For every entry in m2 find an entry in m1 and fold - - - - - Union entries by identical key, using the provided function to union sets of values - - - - - Not a very useful function - only called in one place - should be changed - - - - - Like Seq.distinctBy but only filters out duplicates for some of the elements - - - - - Interface that defines methods for comparing objects using partial equality relation - - - - - Intern tables to save space. - - - - - Bind the cancellation token associated with the computation - - - - - Run the computation in a mode where it may not be cancelled. The computation never results in a - ValueOrCancelled.Cancelled. - - - - - Run a cancellable computation using the given cancellation token - - - - - Represents a place in the compiler codebase where we assume we are executing on a compilation thread - - - - - Represents a place in the compiler codebase where we are passed a CompilationThreadToken unnecessarily. - This represents code that may potentially not need to be executed on the compilation thread. - - - - - Represents a place where we are stating that execution on the compilation thread is required. The - reason why will be documented in a comment in the code at the callsite. - - - - - Splits a string into substrings based on the strings in the array separators - - - - - Split a large ResizeArray into a series of array chunks that are each under the Large Object Heap limit. - This is done to help prevent a stop-the-world collection of the single large array, instead allowing for a greater - probability of smaller collections. Stop-the-world is still possible, just less likely. - - - - - Split a ResizeArray into an array of smaller chunks. - This requires `items/chunkSize` Array copies of length `chunkSize` if `items/chunkSize % 0 = 0`, - otherwise `items/chunkSize + 1` Array copies. - - - - - Returns true if one array has trailing elements equal to another's. - - - - - Returns true if one array has another as its subset from index 0. - - - - - Check if subArray is found in the wholeArray starting at the provided index - - - - - Returns all heads of a given array. - - - - - Optimized arrays equality. ~100x faster than `array1 = array2` on strings. - ~2x faster for floats - ~0.8x slower for ints - - - - - Returns a new array with an element replaced with a given value. - - - - - Async implementation of Array.map. - - - - - pass an array byref to reverse it in place - - - - - Indicates that a type may be null. 'MaybeNull<string>' is used internally in the F# compiler as - replacement for 'string?' to align with FS-1060. - - - - - Runs the computation synchronously, always starting on the current thread. - - - - - Get an initialization hole - - - - - Per the docs the threshold for the Large Object Heap is 85000 bytes: https://learn.microsoft.com/dotnet/standard/garbage-collection/large-object-heap#how-an-object-ends-up-on-the-large-object-heap-and-how-gc-handles-them - We set the limit to be 80k to account for larger pointer sizes for when F# is running 64-bit. - - - - - Checks the argument is non-null - - - - - Asserts the argument is non-null and raises an exception if it is - - - - - Match on the nullness of an argument. - - - - - Asserts the argument is non-null and raises an exception if it is - - - - - Returns true if the argument is non-null. - - - - - Returns true if the list contains exactly 1 element. Otherwise false. - - - - - Returns true if the list has less than 2 elements. Otherwise false. - - - - - Logical shift right treating int32 as unsigned integer. - Code that uses this should probably be adjusted to use unsigned integer types. - - - - - Register some items to dispose - - - - - Track a set of resources to cleanup - - - - - Caches, mainly for free variables - - - - - 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. - - - - - Like Append, but returns unit - - - - - Writing to output stream via a string buffer. - - - - - Buffer printing utility - - - - - Specialized parallel functions for an array. - Different from Array.Parallel as it will try to minimize the max degree of parallelism. - Will flatten aggregate exceptions that contain one exception. - - - - - Note: if duplicates appear, keep the ones toward the _front_ of the list - - - - - NOTE: not tail recursive! - - - - - NOTE: quadratic! - - - - - NOTE: O(n)! - - - - - NOTE: O(n)! - - - - - 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 and returns None if value does not exist. - - - - - 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. - - - - - Get the most significant byte of a 32-bit integer - - - - - Get the 3rd least significant byte of a 32-bit integer - - - - - Get the 2nd least significant byte of a 32-bit integer - - - - - Get the least significant byte of a 32-bit integer - - - - - Rational arithmetic, used for exponents on units-of-measure - - - - - Map a directory name with its replacement. - Prefixes are compared case sensitively. - - - - - Map a file path with its replacement. - Prefixes are compared case sensitively. - - - - - Add a path mapping to the map. - - - - - Interpret tables for a unicode lexer generated by <c>fslex.exe</c>. - - - - - Create the tables from raw data - - - - - The type of tables for an unicode lexer generated by <c>fslex.exe</c>. - - - - - 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. - - - - - Determines if the parser can report FSharpCore library-only features. - - - - - The currently matched text as a Span, it is only valid until the lexer is advanced - - - - - Get the language version being supported - - - - - 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. - - - - - True if the specified language feature is supported. - - - - - Fast helper to turn the matched characters into a string, avoiding an intermediate array. - - - - - Determine if Lexeme contains a specific character - - - - - Get single character of matched string - - - - - Create a lex buffer backed by source text. - - - - - Create a lex buffer that reads character or byte inputs by using the given function. - - - - - Create a lex buffer suitable for Unicode lexing that reads characters from the given array. - Important: does take ownership of the array. - - - - - Logs a recoverable error if a language feature is unsupported, at the specified range. - - - - - Input buffers consumed by lexers generated by <c>fslex.exe</c>. - The type must be generic to match the code generated by FsLex and FsYacc (if you would like to - fix this, please submit a PR to the FsLexYacc repository allowing for optional emit of a non-generic type reference). - - - - - Return absolute offset of the start of the line marked by the position. - - - - - The character number in the input stream. - - - - - The line number for the position in the input stream, assuming fresh positions have been updated - using for the new line. - - - - - The line number in the input stream, assuming fresh positions have been updated - for the new line by modifying the EndPos property of the LexBuffer. - - - - - The file index for the file associated with the input stream, use <c>fileOfFileIndex</c> to decode - - - - - Given a position just beyond the end of a line, return a position at the start of the next line. - - - - - Get an arbitrary position, with the empty string as file name. - - - - - Same line, column -1. - - - - - Return the column number marked by the position, - i.e. the difference between the <c>AbsoluteOffset</c> and the <c>StartOfLineAbsoluteOffset</c> - - - - - Gives a position shifted by specified number of characters. - - - - - Given a position at the start of a token of length n, return a position just beyond the end of the token. - - - - - Apply a #line directive. - - - - - Position information stored for lexing tokens - - - - - The tag of the error terminal. - - - - - The total number of terminals. - - - - - This function is used to hold the user specified "parse_error" or "parse_error_rich" functions. - - - - - This table is logically part of the Goto table. - - - - - The sparse table offsets for the productions active for each state. - - - - - The sparse table for the productions active for each state. - - - - - The sparse goto table row offsets. - - - - - The sparse goto table. - - - - - The immediate action table. - - - - - The number of symbols for each reduction. - - - - - The sparse action table row offsets. - - - - - The sparse action table elements. - - - - - A function to compute the data carried by a token. - - - - - A function to compute the tag of a token. - - - - - The token number indicating the end of input. - - - - - The reduction table. - - - - - Interpret the parser table taking input from the given lexer, using the given lex buffer, and the given start state. - Returns an object indicating the final synthesized value for the parse. - - - - - Tables generated by fsyacc - The type of the tables contained in a file produced by the <c>fsyacc.exe</c> parser generator. - - - - - The stack of state indexes active at the parse error . - - - - - The token that would cause a shift at the parse error. - - - - - The stack of productions that would be reduced at the parse error. - - - - - The tokens that would cause a reduction at the parse error. - - - - - The state active at the parse error. - - - - - The message associated with the parse error. - - - - - The token that caused the parse error. - - - - - The context provided when a parse error occurs. - - - - - Get the start of the range of positions matched by the production. - - - - - Get the full range of positions matched by the production. - - - - - Get the end of the range of positions matched by the production. - - - - - Return the LexBuffer for this parser instance. - - - - - Raise an error in this parse context. - - - - - Get the start position for the terminal or non-terminal at a given index matched by the production. - - - - - Get the start and end position for the terminal or non-terminal at a given index matched by the production. - - - - - Get the end position for the terminal or non-terminal at a given index matched by the production. - - - - - Get the value produced by the terminal or non-terminal at the given position. - - - - - Indicates a parse error has occurred and parse recovery is in progress. - - - - - Indicates an accept action has occurred. - - - - - The default implementation of the parse_error function. - - - - - The default implementation of the parse_error_rich function. - - - - - Helpers used by generated parsers. - - - - - Auxiliary function for `Continuation.sequence` that assumes the recursions return a 'T list. - In the final continuation the `'T list list` will first be concatenated into one list, before being passed to the (final) `continuation`. - - - - - This function sequences computations that have been expressed in continuation-passing style. - Concretely, when 'T is `int` as an example, can be expressed in continuation-passing style as a function, - taking as its input another function that is "how to proceed with a computation given the value of the integer", - and returning "the result of that computation". - That is, an integer is equivalently represented as a generic function (howToProceed : int -> 'TReturn) -> 'TReturn, - and the effect of the function corresponding to the integer 3 is simply to apply the input `howToProceed` to the value 3. - - The motivation for Continuation.sequence is most easily understood when it is viewed without its second argument: - it is a higher-order function that takes "a list of 'T expressed in continuation-passing style", and returns "a 'T list expressed in continuation-passing style". - The resulting "continuation-passing 'T list" operates by chaining the input 'Ts together, and finally returning the result of continuing the computation after first sequencing the inputs. - - Crucially, this technique can be used to enable unbounded recursion: - it constructs and invokes closures representing intermediate stages of the sequenced computation on the heap, rather than consuming space on the (more constrained) stack. - - - - - Test to report for the name of the type provider that produced the value - - - - - The ILScopeRef of the runtime assembly reference for type provider that produced the value - - - - - A type provider that produced the value - - - - - Apply an operation and 'untaint' the result. This can be used if the return type - is guaranteed not to be implemented by a type provider - - - - - Apply an operation and 'untaint' the result. The result must be marshallable. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation that returns an option. Unwrap option. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. No exception may be raised by 'f' - - - - - Apply an operation that returns an array. Unwrap array. Any exception will be attributed to the type provider with an error located at the given range. String is method name of thing-returning-array, to diagnostically attribute if it is null - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Conditionally coerce the value - - - - - Create an initial tainted value - - - - - Assert that the value is of 'U and coerce the value. - If coercion fails, the failure will be blamed on a type provider - - - - - This struct wraps a value produced by a type provider to properly attribute any failures. - - - - - creates new instance of TypeProviderError with specified type\method names - - - - - creates new instance of TypeProviderError based on current instance information(message) - - - - - provides uniform way to process aggregated errors - - - - - creates new instance of TypeProviderError that represents collection of errors - - - - - creates new instance of TypeProviderError that represents one error - - - - - Stores and transports aggregated list of errors reported by the type provider - - - - - Determines if an assembly is in the core set of assemblies with high likelihood of - being shared amongst a set of common scripting references - - - - - Gets the selected target framework moniker, e.g netcore3.0, net472, and the running rid of the current machine - - - - - Resolves the references for a chosen or currently-executing framework, for - - script execution - - script editing - - script compilation - - out-of-project sources editing - - default references for fsc.exe - - default references for fsi.exe - - - - - Whether or not this file should be a single-file project - - - - - A helpers for dealing with F# files. - - - - - Whether or not this file is compilable - - - - - Return true if this is a subcategory of error or warning message that the language service can emit - - - - - Return the language ID, which is the expression evaluator id that the debugger will use. - - - - - Return the compilation defines that should be used when editing the given file. - - - - - These are the names of assemblies that should be referenced for .fs or .fsi files that - are not associated with a project. - - - - - The default location of FSharp.Core.dll and fsc.exe based on the version of fsc.exe that is running - - - - - Information about the compilation environment - - - - - Creates a ByteStorage that has a copy of the given Memory<byte>. - - - - - Creates a ByteStorage that has a copy of the given ByteMemory. - - - - - Creates a ByteStorage whose backing bytes are the given ByteMemory. Does not make a copy. - - - - - Creates a ByteStorage that has a copy of the given byte array. - - - - - Creates a ByteStorage whose backing bytes are the given byte array. Does not make a copy. - - - - - Imperative buffers and streams of byte[] - Not thread safe. - - - - - Create a default implementation of the file system - - - - - Represents a default (memory-mapped) implementation of the file system - - - - - Open the file for writing. Returns a Stream. - - - - - Open the file for read, returns ByteMemory, uses either FileStream (for smaller files) or MemoryMappedFile (for potentially big files, such as dlls). - - - - - Removes relative parts from any full paths - - - - - Used to determine if a file will not be subject to deletion during the lifetime of a typical client process. - - - - - A shim over Path.IsPathRooted - - - - - A shim over Path.IsInvalidPath - - - - - A shim over Path.GetTempPath - - - - - Utc time of the last modification - - - - - Take in a file name with an absolute path, and return the same file name - but canonicalized with respect to extra path separators (e.g. C:\\\\foo.txt) - and '..' portions - - - - - Take in a directory, filename, and return canonicalized path to the file name in directory. - If file name path is rooted, ignores directory and returns file name path. - Otherwise, combines directory with file name and gets full path via GetFullPathShim(string). - - - - - A shim for getting directory name from path - - - - - A shim over File.Exists - - - - - A shim over File.Delete - - - - - A shim over Directory.EnumerateFiles - - - - - A shim over Directory.EnumerateDirectories - - - - - A shim over Directory.Exists - - - - - A shim over Directory.Delete - - - - - A shim over Directory.Exists, but returns a string, the FullName of the resulting - DirectoryInfo. - - - - - A shim over Path.ChangeExtension - - - - - Represents a shim for the file system - - - - - Default implementation for IAssemblyLoader - - - - - Used to load type providers and located assemblies in F# Interactive - - - - - Used to load a dependency for F# Interactive and in an unused corner-case of type provider loading - - - - - Type which we use to load assemblies. - - - - - Gets a ByteMemory object that is empty - - - - - Empty byte memory. - - - - - Creates a ByteMemory object that is backed by a raw pointer. - Use with care. - - - - - Create a ByteMemory object that has a backing memory mapped file. - - - - - Creates a ByteMemory object that is backed by a byte array. - - - - - Creates a ByteMemory object that is backed by a byte array with the specified offset and length. - - - - - Get a stream representation of the backing memory. - Disposing this will not free up any of the backing memory. - - - - - Get a stream representation of the backing memory. - Disposing this will not free up any of the backing memory. - Stream cannot be written to. - - - - - A view over bytes. - May be backed by managed or unmanaged memory, or memory mapped file. - - - - - The global hook into the file system - - - - - Checks whether file is dll (ends in .dll) - - - - - Trim the quotes and spaces from either end of a string - - - - - Get the file name without extension of the given path. - - - - - Get the file name of the given path. - - - - - Return True if the path has a "." extension. - - - - chopExtension f removes the extension from the given - file name. Raises ArgumentException if no extension is present. - - - checkSuffix f s returns True if file name "f" ends in suffix "s", - e.g. checkSuffix "abc.fs" ".fs" returns true. - Disregards casing, e.g. checkSuffix "abc.Fs" ".fs" returns true. - - - - Filesystem helpers - - - - - MemoryMapped extensions - - - - - each int will be 0 <= x <= 255 - - - - - each int must be 0 <= x <= 255 - - - - - returned int will be 0 <= x <= 255 - - - - - Get the text used to specify the version, several of which may map to the same version - - - - - Get the list of valid versions - - - - - Get the list of valid options - - - - - Get the specified LanguageVersion as a string - - - - - Get the specified LanguageVersion - - - - - Has preview been explicitly specified - - - - - Does the selected LanguageVersion support the specified feature - - - - - Has been explicitly specified as 4.6, 4.7 or 5.0 - - - - - Get a version string associated with the given feature. - - - - - Get a string name for the given feature. - - - - - Get the list of valid versions - - - - - Create a LanguageVersion management object - - - - - LanguageVersion management - - - - - LanguageFeature enumeration - - - - - Coordinating compiler operations - configuration, loading initial context, reporting errors etc. - - - - - This represents the global state established as each task function runs as part of the build. - - Use to reset error and warning handlers. - - - - - Execute the new function, on a new thread if necessary - - - - - Indicates whether a language feature check should be skipped. Typically used in recursive functions - where we don't want repeated recursive calls to raise the same diagnostic multiple times. - - - - - The result type of a computational modality to collect warnings and possibly fail - - - - - Thread statics for the installed diagnostic logger - - - - - Represents a DiagnosticsLogger that captures all diagnostics, optionally formatting them - eagerly. - - - - - Get the number of error diagnostics reported - - - - - Emit a diagnostic to the logger - - - - - Checks if ErrorCount > 0 - - - - - Represents a capability to log diagnostics - - - - - This is the textual subcategory to display in error and warning messages (shows only under --vserrors): - - file1.fs(72): subcategory warning FS0072: This is a warning message - - - - - - Return true if the textual phase given is from the compile part of the build process. - This set needs to be equal to the set of subcategories that the language service can produce. - - - - - Return true if this phase is one that's known to be part of the 'compile'. This is the initial phase of the entire compilation that - the language service knows about. - - - - - Construct a phased error - - - - - Closed enumeration of build phases. - - - - - An exiter that raises StopProcessingException if Exit is called, saving the exit code in ExitCode. - - - - - Represnts an early exit from parsing, checking etc, for example because 'maxerrors' has been reached. - - - - - Represents the style being used to format errors - - - - - fixes given string by replacing all control chars with spaces. - NOTE: newlines are recognized and replaced with stringThatIsAProxyForANewlineInFlatErrors (ASCII 29, the 'group separator'), - which is decoded by the IDE with 'NewlineifyErrorString' back into newlines, so that multi-line errors can be displayed in QuickInfo - - - - - Stop on first error. Accumulate warnings and continue. - - - - - Stop on first error. Accumulate warnings and continue. - - - - - The bind in the monad. Stop on first error. Accumulate warnings and continue. - <remarks>Not meant for direct usage. Used in other inlined functions</remarks> - - - - - Reports an informational diagnostic - - - - - Reports an error and raises a ReportedError exception - - - - - Reports a warning diagnostic - - - - - Reports an error diagnostic and continues - - - - - NOTE: The change will be undone when the returned "unwind" object disposes - - - - - NOTE: The change will be undone when the returned "unwind" object disposes - - - - - Represents a DiagnosticsLogger that ignores diagnostics and asserts - - - - - Represents a DiagnosticsLogger that discards diagnostics - - - - - An exiter that quits the process if Exit is called. - - - - - Creates a DiagnosticEnabledWithLanguageFeature whose text comes via SR.* - - - - - Creates a DiagnosticWithSuggestions whose text comes via SR.* - - - - - Creates a diagnostic exeption whose text comes via SR.* - - - - - A diagnostic that is raised when enabled manually, or by default with a language feature - - - - - Represents a diagnostic exeption whose text comes via SR.* - - - - - Thrown when we stop processing the F# Interactive entry or #load. - - - - - 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') - - The exception that caused the report is carried as data because in some - situations (LazyWithContext) we may need to re-report the original error - when a lazy thunk is re-evaluated. - - - - - Thrown when we want to add some range information to a .NET exception - - - - - Like ErrorRecover by no range is attached to System.Exception and ArgumentException. - - - - - Perform error recovery from an exception if possible, including catching StopProcessingExn - - - - - Perform error recovery from an exception if possible. - - StopProcessingExn is not caught. - - ReportedError is caught and ignored. - - TargetInvocationException is unwrapped - - If precisely a System.Exception or ArgumentException then the range is attached as InternalError. - - Other exceptions are unchanged - - All are reported via the installed diagnostics logger - - - - - Simulates a diagnostic. For test purposes only. - - - - - Report a diagnostic as an error and raise `ReportedError` - - - - - Report a diagnostic as a warning and recover - - - - - Report a diagnostic as an error and recover - - - - - Instruct the exception not to reset itself when thrown again. - - - - - Literal build phase subcategory strings. - - - - - Demangles a suggestion - - - - - We report a candidate if its edit distance is <= the threshold. - The threshold is set to about a quarter of the number of characters. - - - - - Functions to format error message details - - - - - 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 evaluation of IEnumerable objects - to a small, finite depth, as determined by the printing parameters. - This may lead to additional computation being performed during printing. - - - - - 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. - - - - - Gets the text - - - - - Gets the tag - - - - - Creates text with a tag - - - - - Represents text with a tag - - - - - Represents the tag of some tagged text - - - - - Data representing joints in structured layouts of terms. The representation - of this data type is only for the consumption of formatting engines. - - - - - Represents a range using zero-based line counting (used by Visual Studio) - - - - - Represents a position using zero-based line counting (used by Visual Studio) - - - - - Represents a line number when using zero-based line counting (used by Visual Studio) - - - - - Represents a range within a file - - - - - The range where all values are zero - - - - - The empty range that is located at the start position of the range - - - - - The start line of the range - - - - - The start column of the range - - - - - The start position of the range - - - - - When de-sugaring computation expressions we convert a debug point into a plain range, and then later - recover that the range definitely indicates a debug point. - - - - - Synthetic marks ranges which are produced by intermediate compilation phases. This - bit signifies that the range covers something that should not be visible to language - service operations like dot-completion. - - - - - The file name for the file of the range - - - - - The file index for the range - - - - - The empty range that is located at the end position of the range - - - - - The line number for the end position of the range - - - - - The column number for the end position of the range - - - - - The end position of the range - - - - - Note that a range indicates a debug point - - - - - Convert a range to be synthetic - - - - - Check if the range is adjacent to another range - - - - - Represents a range within a file - - - - - Represents a position in a file - - - - - The line number for the position - - - - - The maximum number of bits needed to store an encoded position - - - - - The encoding of the position as a 64-bit integer - - - - - The column number for the position - - - - - Check if the position is adjacent to another postition - - - - - Decode a position fro a 64-bit integer - - - - - Represents a position in a file - - - - - Notes that a range is related to an implied "Delay"m "Quote" or "Run" at the entry to a computation expression. THis doesn't - apply to the "Delay" calls added for try/with, try/finally, while or for constructs. - - - - - Notes that a range is related to a sequential "a; b" translated to a "Combine" call in a computation expression - - This doesn't include "expr; cexpr" sequentials where the "expr" is a side-effecting simple statement - This does include "expr; cexpr" sequentials where the "expr" is interpreted as an implicit yield + Combine call - - - - - Notes that a range is related to a "with" in a "try/with" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "finally" in a "try/finally" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "let" or other binding range in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "try" in a "try/with" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "in" in a "for .. in ... do" or "to" in "for .. = .. to .. do" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "for" in "for .. do" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "while" in "while .. do" in a computation, list, array or sequence expression - - - - - An index into a global tables of filenames - - - - - Render a Layout yielding an 'a using a 'b (hidden state) type - - - - - An enhancement to TaggedText in the TaggedText layouts generated by FSharp.Compiler.Service - - - - - Gets the total length of the input in characters - - - - - Gets a character in an input based on an index of characters from the start of the file - - - - - Checks if a section of the input is equal to the given string - - - - - Gets a section of the input - - - - - Gets a section of the input based on a given range. - <exception cref="System.ArgumentException">Throws an exception when the input range is outside the file boundaries.</exception> - - - - - Gets a line of an input by index - - - - - Gets the count of lines in the input - - - - - Gets the last character position in the input, returning line and column - - - - - Copies a section of the input to the given destination ad the given index - - - - - Checks if one input is equal to another - - - - - Represents an input to the F# compiler - - - - - 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 Layout module. any_to_string and output_any are - built using any_to_layout with default format options. - - - - - For limiting 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. - - - - - See tagL - - - - - Layout like an F# list. - - - - - Layout like an F# option. - - - - - Layout list vertically. - - - - - Layout two vertically. - - - - - Form tuple of layouts. - - - - - Wrap braces around layout. - - - - - Wrap square brackets around layout. - - - - - Wrap round brackets around Layout. - - - - - Join layouts into a list separated using the given Layout. - - - - - Join layouts into a semi-colon separated list. - - - - - Join layouts into a space separated list. - - - - - Join layouts into a comma separated list. - - - - - Join broken with ident=4 - - - - - Join broken with ident=3 - - - - - Join broken with ident=2 - - - - - Join broken with ident=1 - - - - - Join broken with ident=0 - - - - - optional break, indent=4 - - - - - optional break, indent=3 - - - - - Join, possible break with indent=2 - - - - - Join, possible break with indent=1 - - - - - Join, possible break with indent=0 - - - - - Join, unbreakable. - - - - - An string which is left parenthesis (no space on the right). - - - - - An string which is right parenthesis (no space on the left). - - - - - An string which requires no spaces either side. - - - - - An string leaf - - - - - 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. - - - - - Check if the last character in the layout is the given character - - - - - Is it the empty layout? - - - - - The empty layout - - - - - 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. - - - - - Convert a line number from one-based line counting (used internally in the F# compiler and in F# error messages) to zero-based line counting (used by Visual Studio) - - - - - Convert a line number from zero-based line counting (used by Visual Studio) to one-based line counting (used internally in the F# compiler and in F# error messages) - - - - - Functions related to converting between lines indexed at 0 and 1 - - - - - Equality comparer for range. - - - - - Convert a range from one-based line counting (used internally in the F# compiler and in F# error messages) to zero-based line counting (used by Visual Studio) - - - - - Convert a range from one-based line counting (used internally in the F# compiler and in F# error messages) to zero-based line counting (used by Visual Studio) - - - - - Convert a range to a string - - - - - A range associated with a dummy file for the command line arguments - - - - - A range associated with a dummy file called "startup" - - - - - The zero range - - - - - Make a dummy range for a file - - - - - Test to see if a range occurs fully before a position - - - - - Test to see if a range contains a position - - - - - Test to see if one range contains another range - - - - - Union two ranges, taking their first occurring start position and last occurring end position - - - - - Output a range - - - - - Order ranges (file, then start pos, then end pos) - - - - - Reduce a range so it only covers a line - - - - - Make a range for the first non-whitespace line of the file if any. Otherwise use line 1 chars 0-80. - This involves reading the file. - - - - - This view hides the use of file indexes and just uses filenames - - - - - This view of range marks uses file indexes explicitly - - - - - Ordering on positions - - - - - Convert an index into a file path - - - - - Convert a file path to an index - - - - - The zero position - - - - - Convert a position to a string - - - - - Output a position - - - - - Convert a position from one-based line counting (used internally in the F# compiler and in F# error messages) to zero-based line counting (used by Visual Studio) - - - - - Convert a position from zero-based line counting (used by Visual Studio) to one-based line counting (used internally in the F# compiler and in F# error messages) - - - - - Compare positions for greater-than-or-equal-to - - - - - Compare positions for equality - - - - - Compare positions for greater-than - - - - - Compare positions for less-than - - - - - Create a position for the given line and column - - - - - Render layout to collector of TaggedText - - - - - Render layout to StringBuilder - - - - - Render layout to channel - - - - - Render layout to string - - - - - Run a render on a Layout - - - - - Creates an ISourceText object from the given string - - - - - Functions related to ISourceText objects - - - - - Return 'true' if the computation is in-progress. - - - - - Return 'true' if the computation has already been computed. - - - - - Return 'Some' if the computation has already been computed, else None if - the computation is in-progress or has not yet been started. - - - - - Return NodeCode which, when executed, will get the value of the computation if already computed, or - await an existing in-progress computation for the node if one exists, or else will synchronously - start the computation on the current thread. - - - - - Creates a GraphNode with given result already cached. - - - - - - computation - The computation code to run. - - - - - Evaluate the computation, allowing asynchronous waits on existing ongoing evaluations of the - same node, and strongly cache the result. - - Once the result has been cached, the computation function will also be removed, or 'null'ed out, - as to prevent any references captured by the computation from being strongly held. - - - - - Only used for testing, do not use - - - - - Used in places where we don't care about cancellation, e.g. the command line compiler - and F# Interactive - - - - - Only used for testing, do not use - - - - - Execute the cancellable computation synchronously using the ambient cancellation token of - the NodeCode. - - - - - Only used for testing, do not use - - - - - Contains helpers to specify code that can be run as part of the build graph. - - - - - A generic 'use' that disposes of the IDisposable at the end of the computation. - - - - - A limited form 'use' for establishing the compilation globals. - - - - - A standard builder for node code. - - - - - Represents code that can be run as part of the build graph. - - This is essentially cancellable async code where the only asynchronous waits are on nodes. - When a node is evaluated the evaluation is run synchronously on the thread of the - first requestor. - - - - - Specifies code that can be run as part of the build graph. - - - - - Asynchronously await code in the build graph - - - - - Allows to specify the language for error messages - - - - - Contains helpers related to the build graph - - - - - Will not dispose of the stream reader. - - - - - Try to get the XmlDocumentationInfo for a file - - - - - Represents a capability to access XmlDoc files - - - - - Look up an item in the XmlDoc file - - - - - Create an XmlDocumentationInfo from a file - - - - - Represents access to an XmlDoc file - - - - - Get the overall range of the PreXmlDoc - - - - - Indicates if the PreXmlDoc is non-empty - - - - - Get the empty PreXmlDoc - - - - - Process and check the PreXmlDoc, checking with respect to the given parameter names - - - - - Merge two PreXmlDoc - - - - - Mark the PreXmlDoc as invalid - - - - - Create a PreXmlDoc from a collection of unprocessed lines - - - - - Represents the XmlDoc fragments as collected from the lexer during parsing - - - - - Get the documentation lines before the given point - - - - - Indicates it the given point has XmlDoc comments - - - - - Check if XmlDoc comments are at invalid positions, and if so report them - - - - - Add a line of XmlDoc text - - - - - Indicate the next XmlDoc will act as a point where prior XmlDoc are collected - - - - - Add a point where prior XmlDoc are collected - - - - - Create a fresh XmlDocCollector - - - - - Used to collect XML documentation during lexing and parsing. - - - - - Get the lines before insertion of implicit summary tags and encoding - - - - - Indicates the overall original source range of the XmlDoc - - - - - Indicates if the XmlDoc is non-empty - - - - - Indicates if the XmlDoc is empty - - - - - Get the empty XmlDoc - - - - - Merge two XML documentation - - - - - Get the elaborated XML documentation as XML text - - - - - Get the lines after insertion of implicit summary tags and encoding - - - - - Check the XML documentation - - - - - Represents collected XmlDoc lines - - - - - Represents additional information for SynConst.Measure - - - - - The syntax ranges of the `&` tokens - - - - - Represents additional information for SynTyparDecl - - - - - The syntax range of 'get, set' - - - - - Represents additional information for SynMemberSig.Member - - - - - The syntax range of the `:` token - - - - - Represents additional information for SynBindingReturnInfo - - - - - The syntax range of the `or` keyword - - - - - Represents additional information for SynType.Or - - - - - Used leading keyword of SynField - - - - - Represents additional information for SynField - - - - - The syntax range of 'get, set' - - - - - Represents additional information for SynMemberDefn.AbstractSlot - - - - - The syntax range of 'get, set' - - - - - The syntax range of the `=` token - - - - - The syntax range of the `with` keyword - - - - - Used leading keyword of AutoProperty - - - - - Represents additional information for SynMemberDefn.AutoProperty - - - - - Represents additional information for `get, set` syntax - - - - - The syntax range from the beginning of the `(` token till the end of the `)` token. - - - - - Represents additional information for SynArgPats.NamePatPairs - - - - - The syntax range of the `as` keyword - - - - - Represents additional information for SynMemberDefn.ImplicitCtor - - - - - The syntax range of the `set` keyword - - - - - The syntax range of the `and` keyword - - - - - The syntax range of the `get` keyword - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `inline` keyword - - - - - Represents additional information for SynMemberDefn.GetSetMember - - - - - The syntax range of the `->` token. - - - - - Represents additional information for SynType.Fun - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `inline` keyword - - - - - Used leading keyword of SynValSig - In most cases this will be `val`, - but in case of `SynMemberDefn.AutoProperty` or `SynMemberDefn.AbstractSlot` it could be something else. - - - - - Represents additional information for SynValSig - - - - - The syntax range of the `module` or `namespace` keyword - - - - - Represents additional information for SynModuleOrNamespaceSig - - - - - The syntax range of the `module` or `namespace` keyword - - - - - Represents additional information for SynModuleOrNamespace - - - - - Represents the leading keyword in a SynModuleOrNamespace or SynModuleOrNamespaceSig - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `module` keyword - - - - - Represents additional information for SynModuleSigDecl.NestedModule - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `module` keyword - - - - - Represents additional information for SynModuleDecl.NestedModule - - - - - The syntax range of the `in` keyword. - - - - - The syntax range of the `=` token. - - - - - Represents additional information for SynExprAndBang - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `inline` keyword - - - - - Used leading keyword of SynBinding - - - - - Represents additional information for SynBinding - - - - - Represents the leading keyword in a SynBinding or SynValSig - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `type` or `and` keyword. - - - - - Represents additional information for SynTypeDefnSig - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `type` or `and` keyword. - - - - - Represents additional information for SynTypeDefn - - - - - Produced during type checking, should not be used in actual parsed trees. - - - - - Can happen in SynMemberDefn.NestedType or SynMemberSig.NestedType - - - - - Represents the leading keyword in a SynTypeDefn or SynTypeDefnSig - - - - - The syntax range of the `::` token. - - - - - Represents additional information for SynPat.Cons - - - - - The syntax range of the `|` token. - - - - - Represents additional information for SynPat.Or - - - - - The syntax range of the `|` token. - - - - - Represents additional information for SynUnionCase - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `|` token. - - - - - Represents additional information for - - - - - The syntax range of the `|` token. - - - - - The syntax range of the `->` token. - - - - - Represents additional information for SynMatchClause - - - - - The syntax range of the `{|` token. - - - - - Represents additional information for SynExpr.AnonRecd - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `match!` keyword - - - - - Represents additional information for SynExpr.MatchBang - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `match` keyword - - - - - Represents additional information for SynExpr.Match - - - - - The syntax range of the `=` token. - - - - - Represents additional information for SynExpr.LetOrUseBang - - - - - The syntax range of the `in` keyword. - - - - - Represents additional information for SynExpr.LetOrUse - - - - - Represents additional information for SynExpr.DotLambda - - - - - The syntax range of the `->` token. - - - - - Represents additional information for SynExpr.Lambda - - - - - The syntax range from the beginning of the `if` keyword till the end of the `then` keyword. - - - - - The syntax range of the `else` keyword. - - - - - The syntax range of the `then` keyword. - - - - - Indicates if the `elif` keyword was used - - - - - The syntax range of the `if` keyword. - - - - - Represents additional information for SynExpr.IfThenElse - - - - - The syntax range of the `finally` keyword - - - - - The syntax range of the `try` keyword. - - - - - Represents additional information for SynExpr.TryFinally - - - - - The syntax range from the beginning of the `with` keyword till the end of the TryWith expression. - - - - - The syntax range of the `with` keyword - - - - - The syntax range from the beginning of the `try` keyword till the end of the `with` keyword. - - - - - The syntax range of the `try` keyword. - - - - - Represents additional information for SynExpr.TryWith - - - - - Represent code comments found in the source file - - - - - Preprocessor directives of type #if, #else or #endif - - - - - Represents additional information for ParsedSigFileInputTrivia - - - - - Represent code comments found in the source file - - - - - Preprocessor directives of type #if, #else or #endif - - - - - Represents additional information for ParsedImplFileInput - - - - - The ident had parenthesis - Example: let (|Odd|Even|) = ... - The active pattern ident will be "|Odd|Even|", while originally there were parenthesis. - - - - - The ident originally had a different notation and parenthesis - Example: let (>=>) a b = ... - The operator ident will be compiled into "op_GreaterEqualsGreater", while the original notation was ">=>" and had parenthesis - - - - - The ident originally had a different notation. - Example: a + b - The operator ident will be compiled into "op_Addition", while the original notation was "+" - - - - - 'e1 |||> e2' - - - - - 'e1 ||> e2' - - - - - 'e1 |> e2' - - - - - 'e1 || e2' - - - - - 'e1 && e2' - - - - - "fun (UnionCase x) (UnionCase y) -> body" - ==> - "fun tmp1 tmp2 -> - let (UnionCase x) = tmp1 in - let (UnionCase y) = tmp2 in - body" - - - - - 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 - - - - - Recognize the '()' in 'new()' - - - - - This affects placement of debug points - - - - - Match a long identifier, including the case for single identifiers which gets a more optimized node in the syntax tree. - - - - - Infer the syntactic information for a 'let' or 'member' definition, based on the argument pattern, - any declared return information (e.g. .NET attributes on the return element), and the r.h.s. expression - in the case of 'let' definitions. - - - - - Transform a property declared using '[static] member P = expr' to a method taking a "unit" argument. - This is similar to IncorporateEmptyTupledArgForPropertyGetter, but applies to member definitions - rather than member signatures. - - - - - Make sure only a solitary unit argument has unit elimination - - - - - Infer the syntactic argument info for one or more arguments a pattern. - - - - - Infer the syntactic argument info for one or more arguments one or more simple patterns. - - - - - Infer the syntactic argument info for a single argument from a simple pattern. - - - - - Get the argument attributes from the syntactic information for an argument. - - - - - Get the argument counts for each curried argument group. Used in some adhoc places in tc.fs. - - - - - Add a parameter entry to the syntactic value information to represent the value argument for a property setter. This is - used for the implicit value argument in property setter signature specifications. - - - - - Add a parameter entry to the syntactic value information to represent the 'this' argument. This is - used for the implicit 'this' argument in member signature specifications. - - - - - Add a parameter entry to the syntactic value information to represent the '()' argument to a property getter. This is - used for the implicit '()' argument in property getter signature specifications. - - - - - Check if there are any optional arguments in the syntactic argument information. Used when adjusting the - types of optional arguments for function and member signatures. - - - - - Check if one particular argument is an optional argument. Used when adjusting the - types of optional arguments for function and member signatures. - - - - - Determine if a syntactic information represents a member without arguments (which is implicitly a property getter) - - - - - The 'argument' information for the 'this'/'self' parameter in the cases where it is not given explicitly - - - - - The 'argument' information for a return value where no attributes are given for the return value (the normal case) - - - - - The argument information for a '()' argument - - - - - The argument information for a curried argument without a name - - - - - The argument information for an argument without a name - - - - - Operations related to the syntactic analysis of arguments of value, function and member definitions and signatures. - - - - - Incorporate a '^' for an qualified access to a generic type parameter - - - - - The error raised by the parse_error_rich function, which is called by the parser engine - when a syntax error occurs. The first object is the ParseErrorContext which contains a dump of - information about the grammar at the point where the error occurred, e.g. what tokens - are valid to shift next at that point in the grammar. This information is processed in CompileOps.fs. - - - - - This function gets the name of a token as a string - - - - - This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production - - - - - This function maps integer indexes to symbolic token ids - - - - - This function maps tokens to integer indexes - - - - - This function gets the name of a token as a string - - - - - This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production - - - - - This function maps integer indexes to symbolic token ids - - - - - This function maps tokens to integer indexes - - - - - Used in lex.fsl to represent the state of a block comment - - - - - Used in lex.fsl to represent the state of a single line comment - - - - - Used in lex.fsl to represent the state of a string literal - - - - - The context applicable to all lexing functions (tokens, strings etc.) - - - - - Lexer args: status of #light processing. Mutated when a #light - directive is processed. This alters the behaviour of the lexfilter. - - - - - Arbitrary value - - - - - Rule rest - - - - - Rule tokenstream - - - - - Rule mlOnly - - - - - Rule tripleQuoteStringInComment - - - - - Rule verbatimStringInComment - - - - - Rule stringInComment - - - - - Rule comment - - - - - Rule singleLineComment - - - - - Rule extendedInterpolatedString - - - - - Rule tripleQuoteString - - - - - Rule verbatimString - - - - - Rule singleQuoteString - - - - - Rule endline - - - - - Rule ifdefSkip - - - - - Rule token - - - - - The LexBuffer associated with the filter - - - - - Get the next token - - - - - Create a lex filter - - - - - A stateful filter over the token stream that adjusts it for indentation-aware syntax rules - Process the token stream prior to parsing. Implements the offside rule and other lexical transformations. - - - - - Match the close of '>' of a set of type parameters. - This is done for tokens such as '>>' by smashing the token - - - - - LexFilter - process the token stream prior to parsing. - Implements the offside rule and a couple of other lexical transformations. - - - - - Compute the hash value for the tainted value - - - - - Test whether the tainted value equals given value. Type providers are ignored (equal tainted values produced by different type providers are equal) - Failure in call to equality operation will be blamed on type provider of first operand - - - - - Test whether the tainted value equals given value. - Failure in call to equality operation will be blamed on type provider of first operand - - - - - Test whether the tainted value is null - - - - - The table of remappings from type names in the provided assembly to type - names in the statically linked, embedded assembly. - - - - - Create a new static linking map, ready to populate with data. - - - - - The table of information recording remappings from type names in the provided assembly to type - names in the statically linked, embedded assembly, plus what types are nested in side what types. - - - - - Represents the remapping information for a generated provided type and its nested types. - - There is one overall tree for each root 'type X = ... type generation expr...' specification. - - - - - Convert the expression to a string for diagnostics - - - - - Map the TyconRef objects, if any - - - - - The context used to interpret information in the closure of System.Type, System.MethodInfo and other - info objects coming from the type provider. - - At the moment this is the "Type --> ILTypeRef" and "Type --> Tycon" remapping - context for generated types (it is empty for erased types). This is computed from - while processing the [<Generate>] declaration related to the type. - - Immutable (after type generation for a [<Generate>] declaration populates the dictionaries). - - The 'obj' values are all TyconRef, but obj is used due to a forward reference being required. Not particularly - pleasant, but better than intertwining the whole "ProvidedType" with the TAST structure. - - - - - The folder for temporary files - - - - - All referenced assemblies, including the type provider itself, and possibly other type providers. - - - - - Whether or not the --showextensionresolution flag was supplied to the compiler. - - - - - Output file name - - - - - The folder from which an extension provider is resolving from. This is typically the project folder. - - - - - Carries information about the type provider resolution environment. - - - - - Check if this is a direct reference to a non-embedded generated type. This is not permitted at any name resolution. - We check by seeing if the type is absent from the remapping context. - - - - - Get the ILTypeRef for the provided type (including for nested types). Do not take into account - any type relocations or static linking for generated types. - - - - - Get the ILTypeRef for the provided type (including for nested types). Take into account - any type relocations or static linking for generated types. - - - - - Decompose the enclosing name of a type (including any class nestings) into a list of parts. - e.g. System.Object -> ["System"; "Object"] - - - - - Get the parts of a .NET namespace. Special rules: null means global, empty is not allowed. - - - - - Try to resolve a type in the given extension type resolver - - - - - Try to resolve a type in the given extension type resolver - - - - - Try to apply a provided method to the given static arguments. - - - - - Try to apply a provided type to the given static arguments. If successful also return a function - to check the type name is as expected (this function is called by the caller of TryApplyProvidedType - after other checks are made). - - - - - Validate that the given provided type meets some of the rules for F# provided types - - - - - Get the provided expression for a particular use of a method. - - - - - Given an extension type resolver, supply a human-readable name suitable for error messages. - - - - - Find and instantiate the set of ITypeProvider components for the given assembly reference - - - - - Get the list of relative paths searched for type provider design-time components - - - - - Raised when an type provider has thrown an exception. - - - - - Raised when a type provider has thrown an exception. - - - - - Indicates an F# 3.0+ reference to a named type in an assembly loaded by name - - - - - Indicates an F# 4.0+ reference into the supplied table of type definition references, ultimately resolved by TypeRef/TypeDef data - - - - - Code to pickle out quotations in the quotation binary format. - - - - - A global generator of stable compiler generated names - - - - - A global generator of compiler generated names - - - - - A name generator used by IlxGen for static fields, some generated arguments and other things. - - - - - Generates compiler-generated names marked up with a source code location, but if given the same unique value then - return precisely the same name. Each name generated also includes the StartLine number of the range passed in - at the point of first generation. - - This type may be accessed concurrently, though in practice it is only used from the compilation thread. - It is made concurrency-safe since a global instance of the type is allocated in tast.fs. - - - - - Generates compiler-generated names. Each name generated also includes the StartLine number of the range passed in - at the point of first generation. - - This type may be accessed concurrently, though in practice it is only used from the compilation thread. - It is made concurrency-safe since a global instance of the type is allocated in tast.fs, and it is good - policy to make all globally-allocated objects concurrency safe in case future versions of the compiler - are used to host multiple concurrent instances of compilation. - - - - - Unique name generator for stamps attached to to val_specs, tycon_specs etc. - Concurrency-safe - - - - - Concurrency-safe - - - - - Defines the global environment for all type checking. - - - - - Create a new Val node - - - - - Create a new union case node - - - - - Create a new type parameter node - - - - - Create a new type definition node - - - - - Create a new type parameter node for a declared type parameter - - - - - Create a new TAST RecdField node for an F# class, struct or record field - - - - - Create a new node for the representation information for a provided type definition - - - - - Create a new entity node for a provided type definition - - - - - Create a new node for the contents of a module or namespace - - - - - Create a new entity node for a module or namespace - - - - - Create a Val based on an existing one using the function 'f'. - We require that we be given the parent for the new Val. - - - - - 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 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 new type definition node for a .NET type definition - - - - - Create a new unfilled cache for free variable calculations - - - - - Create a new TAST Entity node for an F# exception definition - - - - - Create a new node for an empty module or namespace contents - - - - - Create a new node for an empty F# tycon data - - - - - Create a new type definition node by cloning an existing one - - - - - Create a new module or namespace node by cloning an existing one - - - - - Create the new contents of an overall assembly - - - - - Create a node for a union type - - - - - Create the union case tables for a union type - - - - - Create the field tables for a record or class type - - - - - Key a Tycon or TyconRef by decoded name - - - - - Key a Tycon or TyconRef by both mangled type demangled name. - Generic types can be accessed either by 'List' or 'List`1'. - This lists both keys. - - - - - Compute the definition location of a provided item - - - - - A set of static methods for constructing types. - - - - - See FreeTyvars above. - - - - - The summary of union constructors used in the expression. These may be - marked 'internal' or 'private' type we have to check various conditions associated with that. - - - - - The summary of fields used in the expression. These may be made private by a signature - or marked 'internal' or 'private' type we have to check various conditions associated with that. - - - - - The summary of locally defined tycon representations used in the expression. These may be made private by a signature - or marked 'internal' or 'private' type we have to check various conditions associated with that. - - - - - 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. - - - - - Indicates if the expression contains a call to a protected member or a base call. - Calls to protected members type direct calls to super classes can't escape, also code can't be inlined - - - - - 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', type we have to check various conditions associated with that. - - - - - Represents the set of free variables in an expression - - - - - Represents an amortized computation of the free variables in an expression - - - - - The summary of type parameters used in the expression. These may not escape the enclosing generic construct - type we have to check various conditions associated with that. - - - - - The summary of values used as trait solutions - - - - - The summary of locally defined type definitions used in the expression. These may be made private by a signature - type we have to check various conditions associated with that. - - - - - Represents a set of 'free' type-related elements, including named types, trait solutions, union cases and - record fields. - - - - - Represents a set of 'free' union cases. Used to collect the union cases referred to from an expression. - - - - - Represents a set of 'free' record field definitions. Used to collect the record field definitions referred to - from an expression. - - - - - Represents a set of 'free' named type definitions. Used to collect the named type definitions referred to - from a type or expression. Computed type cached by later phases (never cached type checking). Cached - in expressions. Not pickled. - - - - - Represents a set of free type parameters. Computed type cached by later phases - (never cached type checking). Cached in expressions. Not pickled. - - - - - Represents a set of free local values. Computed type cached by later phases - (never cached type checking). Cached in expressions. Not pickled. - - - - - Represents the information saved in the assembly signature data resource for an F# assembly - - - - - 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. - - - - - ccu.target is null when a reference is missing in the transitive closure of static references that - may potentially be required for the metadata of referenced DLLs. - - - - - Indicates that this DLL uses F# 2.0+ quotation literals somewhere. This is used to implement a restriction on static linking. - - - - - Indicates that this DLL uses F# 2.0+ quotation literals somewhere. This is used to implement a restriction on static linking. - - - - - The table of type forwarders for this assembly - - - - - A unique stamp for 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?) - - - - - The table of type definitions at the "root" of the assembly - - - - - The table of modules type namespaces at the "root" of the assembly - - - - - The fully qualified assembly reference string to refer to this assembly. This is persisted in quotations - - - - - Indicates if this assembly reference is unresolved - - - - - Is this a provider-injected assembly - - - - - Indicates that this DLL was compiled using the F# compiler type has F# metadata - - - - - Holds the data indicating how this assembly/module is referenced from the code being compiled. - - - - - Holds the file name for the assembly, if any - - - - - Dereference the assembly reference - - - - - A handle to the full specification of the contents of the module contained in this ccu - - - - - The short name of the assembly being referenced - - - - - Try to get the .NET Assembly, if known. May not be present for `IsFSharp` for - in-memory cross-project references - - - - - Try to resolve a path into the CCU by referencing the .NET/CLI type forwarder table of the CCU - - - - - Used to make forward calls into the type/assembly loader when comparing member signatures during linking - - - - - Used to make 'forward' calls into the loader during linking - - - - - Fixup a CCU to have the given contents - - - - - Ensure the ccu is derefable in advance. Supply a path to attach to any resulting error message. - - - - - Create a CCU with the given name but where the contents have not yet been specified - - - - - Create a CCU with the given name type contents - - - - - Used at the end of comppiling an assembly to get a frozen, final stable CCU - for the compilation which we no longer mutate. - - - - - A relinkable handle to the contents of a compilation unit. Relinking is performed by mutation. - - - - - Represents a table of .NET CLI type forwarders for an assembly - - - - - The table of .NET CLI type forwarders for this assembly - - - - - A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality - logic in tastops.fs - - - - - A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality - logic in tastops.fs - - - - - A handle to the full specification of the contents of the module contained in this ccu - - - - - Indicates that this DLL uses pre-F#-4.0 quotation literals somewhere. This is used to implement a restriction on static linking - - - - - A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality - logic in tastops.fs - - - - - Triggered when the contents of the CCU are invalidated - - - - - Is the CCu an assembly injected by a type provider - - - - - Indicates that this DLL was compiled using the F# compiler type has F# metadata - - - - - 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?) - - - - - The fully qualified assembly reference string to refer to this assembly. This is persisted in quotations - - - - - A unique stamp for this DLL - - - - - Holds the data indicating how this assembly/module is referenced from the code being compiled. - - - - - Holds the file name for the DLL, if any - - - - - Represents a complete typechecked assembly, made up of multiple implementation files. - - - - - Represents checked file, after optimization, equipped with the ability to do further optimization of expressions. - - - - - Represents a complete typechecked implementation file, including its inferred or explicit signature. - - CheckedImplFile (qualifiedNameOfFile, pragmas, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypeInfo) - - - - - The moduleOrNamespace represents the signature of the module. - The moduleOrNamespaceContents contains the definitions of the module. - The same set of entities are bound in the ModuleOrNamespace as in the ModuleOrNamespaceContents. - - - - - A named module-or-namespace-fragment definition - - - - - Indicates the module fragment is a 'rec' or 'non-rec' definition of types type modules - - - - - Indicates the module fragment is an evaluation of expression for side-effects - - - - - Indicates the module fragment is a 'let' definition - - - - - Indicates the given 'open' declarations are active - - - - - Indicates the module fragment is made of several module fragments in succession - - - - - The contents of a module-or-namespace-fragment definition - - - - - If it's `namespace Xxx.Yyy` declaration. - - - - - Scope in which open declaration is visible. - - - - - Types whose static content is opened with this declaration. - - - - - Modules or namespaces which is opened with this declaration. - - - - - Full range of the open declaration. - - - - - Syntax after 'open' as it's presented in source code. - - - - - Create a new instance of OpenDeclaration. - - - - - Represents open declaration statement. - - - - - Represents a parameter to an abstract method slot. - - TSlotParam(nm, ty, inFlag, outFlag, optionalFlag, attribs) - - - - - The name of the method - - - - - The method type parameters of the slot - - - - - The formal return type of the slot (regardless of the type or method instantiation) - - - - - The formal parameters of the slot (regardless of the type or method instantiation) - - - - - The (instantiated) type which the slot is logically a part of - - - - - The class type parameters of the slot - - - - - Represents an abstract method slot, or delegate signature. - - TSlotSig(methodName, declaringType, declaringTypeParameters, methodTypeParameters, slotParameters, returnTy) - - - - - A representation of a method in an object expression. - - TObjExprMethod(slotsig, attribs, methTyparsOfOverridingMethod, methodParams, methodBodyExpr, m) - - - - - Indicates the static optimization applies when a type is a struct - - - - - Indicates the static optimization applies when a type equality holds - - - - - Represents the kind of an F# core library static optimization construct - - - - - A call to a base method, e.g. 'base.OnPaint(args)' - - - - - A call to a constructor, e.g. 'new C() = new C(3)' - - - - - A call to a constructor, e.g. 'inherit C()' - - - - - A normal use of a value - - - - - Indicates a use of a value represents a call to a method that may require - a .NET 2.0 constrained call. A constrained call is only used for calls where - - - - - Indicates how a value, function or member is being used at a particular usage point. - - - - - let res = a in b;res - - - - - a ; b - - - - - Represents the kind of sequential operation, i.e. "normal" or "to a before returning b" - - - - - In C syntax this is: *localv_ptr = e - - - - - In C syntax this is: localv = e, note == *(&localv) = e == LAddrOf; LByrefSet - - - - - In C syntax this is: *localv_ptr - - - - - In C syntax this is: &localv - - - - - Indicates what kind of pointer operation this is. - - - - - Evaluate start once type end multiple times, loop up - - - - - Evaluate start type end once, loop down - - - - - Evaluate start type end once, loop up - - - - - Represents the kind of looping operation. - - - - - Marks the compiled form of a 'for ... in ... do ' expression - - - - - Represents the kind of looping operation. - - - - - If this is Some ty then it indicates that a .NET 2.0 constrained call is required, with the given type as the - static type of the object argument. - - - - - Normal record construction - - - - - We're in an explicit constructor. The purpose of the record expression is to - fill in the fields of a pre-created but uninitialized object - - - - - Represents the kind of record construction operation. - - - - - IL method calls. - isProperty -- used for quotation reflection, property getters & setters - noTailCall - DllImport? if so don't tailcall - retTypes -- the types of pushed values, if any - - - - - Operation nodes representing C-style operations on byrefs type mutable vals (l-values) - - - - - Pseudo method calls. This is used for overloaded operations like op_Addition. - - - - - Used for state machine compilation - - - - - Used for state machine compilation - - - - - Used for state machine compilation - - - - - Represents a "rethrow" operation. May not be rebound, or used outside of try-finally, expecting a unit argument - - - - - Conversion node, compiled via type-directed translation or to box/unbox - - - - - Generate a ldflda on an 'a ref. - - - - - IL assembly code - type list are the types pushed on the stack - - - - - An operation representing a field-get from an F# tuple value. - - - - - An operation representing a field-set on an F# exception value. - - - - - An operation representing a field-get from an F# exception value. - - - - - 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. - - - - - An operation representing a field-get from a union value, where that value has been proven to be of the corresponding union case. - - - - - An operation representing a field-get from a union value, where that value has been proven to be of the corresponding union case. - - - - - 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 - - - - - An operation representing getting an integer tag for a union value representing the union case number - - - - - An operation representing getting the address of a record field - - - - - An operation representing getting a record or class field - - - - - An operation representing setting a record or class field - - - - - Construct a record or object-model value. The ValRef is for self-referential class constructors, otherwise - it indicates that we're in a constructor type the purpose of the expression is to - fill in the fields of a pre-created but uninitialized object, type to assign the initialized - version of the object into the optional mutable cell pointed to be the given value. - - - - - An operation representing a lambda-encoded try/finally - - - - - An operation representing a lambda-encoded try/with - - - - - An operation representing a lambda-encoded integer for-loop - - - - - An operation representing a lambda-encoded while loop. The special while loop marker is used to mark compilations of 'foreach' expressions - - - - - Constant uint16 arrays (used for parser tables) - - - - - Constant byte arrays (used for parser tables type other embedded data) - - - - - An operation representing the creation of an array value - - - - - An operation representing the get of a property from an anonymous record - - - - - An operation representing the creation of an anonymous record - - - - - An operation representing the creation of a tuple value - - - - - An operation representing the creation of an exception value using an F# exception declaration - - - - - An operation representing the creation of a union value of the particular union case - - - - - Indicates a debug point should be placed prior to the expression. - - - - - An instance of a link node occurs for every use of a recursively bound variable. When 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. - - - - - 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. - - - - - Used in quotation generation to indicate a witness argument, spliced into a quotation literal. - - For example: - - let inline f x = <@ sin x @> - - needs to pass a witness argument to `sin x`, captured from the surrounding context, for the witness-passing - version of the code. Thus the QuotationTranslation type IlxGen makes the generated code as follows: - - f(x) { return Deserialize(<@ sin _spliceHole @>, [| x |]) } - - f$W(witnessForSin, x) { return Deserialize(<@ sin$W _spliceHole1 _spliceHole2 @>, [| WitnessArg(witnessForSin), x |]) } - - where _spliceHole1 will be the location of the witness argument in the quotation data, type - witnessArg is the lambda for the witness - - - - - - Indicates the expression is a quoted expression tree. - - - - - - An intrinsic applied to some (strictly evaluated) arguments - A few of intrinsics (TOp_try, TOp.While, TOp.IntegerForLoop) expect arguments kept in a normal form involving lambdas - - - - - If we statically know some information 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. - - - - - Matches are a more complicated form of "let" with multiple possible destinations - type possibly multiple ways to get to each destination. - The first range is that of the expression being matched, which is used - as the range for all the decision making type binding that happens during the decision tree - execution. - - - - - Bind a value. - - - - - Bind a recursive set of values. - - - - - Applications. - Applications combine type type term applications, type 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. - - - - - Type lambdas. These are used for the r.h.s. of polymorphic 'let' bindings type - for expressions that implement first-class polymorphic values. - - - - - Lambda expressions. - Why multiple vspecs? A Expr.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. - - - - - Sequence expressions, used for "a;b", "let a = e in b;a" type "a then b" (the last an OO constructor). - - - - - Reference a value. The flag is only relevant if the value is an object model member - type indicates base calls type special uses of object constructors. - - - - - A constant expression. - - - - - Get the mark/range/position information from an expression - - - - - Represents an expression in the typed abstract syntax - - - - - Records the extra metadata stored about typars for type parameters - compiled as "real" IL type parameters, specifically for values with - ValReprInfo. Any information here is propagated from signature through - to the compiled code. - - - - - The range of the signature/implementation counterpart to this argument, if any - - - - - The name for the argument at this position, if any - - - - - The attributes for the argument - - - - - Records the "extra information" for an argument compiled as a real - method argument, specifically the argument name type attributes. - - - - - ValReprInfo (typars, args, result) - - - - - Get the total number of arguments - - - - - Get the number of type parameters of the value - - - - - Get the number of curried arguments of the value - - - - - Get the kind of each type parameter - - - - - Indicates if the value has no arguments - neither type parameters nor value arguments - - - - - Get the number of tupled arguments in each curried argument position - - - - - Get the extra information about the arguments for the value - - - - - Records the "extra information" for a value compiled as a method (rather - than a closure or a local), including argument names, attributes etc. - - - - - Get a reference to the value for the active pattern being referred to - - - - - Get the index of the active pattern element within the overall active pattern - - - - - Get a reference to the value for the active pattern being referred to - - - - - Get the full information about the active pattern being referred to - - - - - Represents a reference to an active pattern element. The - integer indicates which choice in the target set is being selected by this item. - - - - - The value being bound - - - - - The expression the value is being bound to - - - - - The information about whether to emit a sequence point for the binding - - - - - A binding of a variable to an expression, as in a `let` binding or similar - -- val: The value being bound - -- expr: The expression to execute to get the value - -- debugPoint: The debug point for the binding - - - - - A collection of simultaneous bindings - - - - - A target of a decision tree. Can be thought of as a little function, though is compiled as a local block. - -- boundVals - The values bound at the target, matching the valuesin the TDSuccess - -- targetExpr - The expression to evaluate if we branch to the target - -- debugPoint - The debug point for the target - -- isStateVarFlags - Indicates which, if any, of the values are repesents as state machine variables - - - - - Used in error recovery - - - - - Test.ActivePatternCase(activePatExpr, activePatResTys, isStructRetTy, activePatIdentity, idx, activePatInfo) - - Run the active pattern type bind a successful result to a - variable in the remaining tree. - activePatExpr -- The active pattern function being called, perhaps applied to some active pattern parameters. - activePatResTys -- The result types (case types) of the active pattern. - isStructRetTy -- Is the active pattern a struct return - activePatIdentity -- The value type the types it is applied to. If there are any active pattern parameters then this is empty. - idx -- The case number of the active pattern which the test relates to. - activePatternInfo -- The extracted info for the active pattern. - - - - - IsInst(source, target) - - Test if the input to a decision tree is an instance of the given type - - - - - Test if the input to a decision tree is null - - - - - Test if the input to a decision tree is the given constant value - - - - - Test if the input to a decision tree is an array of the given length - - - - - Test if the input to a decision tree matches the given union case - - - - - Get the discriminator associated with the case - - - - - Get the decision tree or a successful test - - - - - Represents a test type a subsequent decision tree - - - - - TDBind(binding, body) - - Bind the given value through the remaining cases of the dtree. - These arise from active patterns type some optimizations to prevent - repeated computations in decision trees. - binding -- the value type the expression it is bound to - body -- the rest of the decision tree - - - - - TDSuccess(results, targets) - - Indicates the decision tree has terminated with success, transferring control to the given target with the given parameters. - results -- the expressions to be bound to the variables at the target - target -- the target number for the continuation - - - - - TDSwitch(input, cases, default, range) - - Indicates a decision point in a decision tree. - input -- The expression being tested. If switching over a struct union this - must be the address of the expression being tested. - cases -- The list of tests type their subsequent decision trees - default -- The default decision tree, if any - range -- (precise documentation needed) - - - - - Decision trees. Pattern matching has been compiled down to - a decision tree by this point. The right-hand-sides (actions) of - 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. - - - - - Constants in expressions - - - - - AttribNamedArg(name, type, isField, value) - - - - - AttribExpr(source, evaluated) - - - - - We keep both source expression type evaluated expression around to help intellisense type signature printing - - - - - Attrib(tyconRef, kind, unnamedArgs, propVal, appliedToAGetterOrSetter, targetsOpt, range) - - - - - Indicates an attribute refers to a type defined in an imported F# assembly - - - - - Indicates an attribute refers to a type defined in an imported .NET assembly - - - - - Raising a measure to a rational power - - - - - The unit of measure '1', e.g. float = float<1> - - - - - An inverse of a units of measure expression - - - - - A product of two units of measure - - - - - A constant, leaf unit-of-measure such as 'kg' or 'm' - - - - - A variable unit-of-measure - - - - - Represents a unit of measure in the typed AST - - - - - Some constant, e.g. true or false for tupInfo - - - - - Get the ILTypeRef for the generated type implied by the anonymous type - - - - - Get the core of the display name for one of the fields of the anonymous record, by index - - - - - Get the display name for one of the fields of the anonymous record, by index - - - - - Create an AnonRecdTypeInfo from the basic data - - - - - Represents the information identifying an anonymous record - - - - - Indicates the type is a unit-of-measure expression being used as an argument to a type or member - - - - - Indicates the type is a variable type, whether declared, generalized or an inference type parameter - - 'flags' is a placeholder for future features, in particular nullness analysis - - - - - 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 type will never appear as an inferred type. They are the types given to - the temporaries arising out of pattern matching on union values. - - - - - Indicates the type is a function type. - - 'flags' is a placeholder for future features, in particular nullness analysis. - - - - - Indicates the type is a tuple type. elementTypes must be of length 2 or greater. - - - - - Indicates the type is an anonymous record type whose compiled representation is located in the given assembly - - - - - Indicates the type is built from a named type type a number of type arguments. - - 'flags' is a placeholder for future features, in particular nullness analysis - - - - - Indicates the type is a universal type, only used for types of values type members - - - - - For now, used only as a discriminant in error message. - See https://github.com/dotnet/fsharp/issues/2561 - - - - - Represents a type in the typed abstract syntax - - - - - Get a reference to the type containing this record field - - - - - Get the Entity for the type containing this record field - - - - - Try to dereference the reference - - - - - Get the signature range of the record field - - - - - Dereference the reference - - - - - Get the declaration range of the record field - - - - - Get the attributes associated with the compiled property of the record field - - - - - Get the name of the field - - - - - Get the name of the field, with backticks added for non-identifier names - - - - - Get the definition range of the record field - - - - - Represents a reference to a field in a record, class or struct - - - - - Dereference the reference to the union case - - - - - Get a reference to the type containing this union case - - - - - Get the Entity for the type containing this union case - - - - - Try to dereference the reference - - - - - Get the signature range of the union case - - - - - Get the resulting type of the union case - - - - - Get the range of the union case - - - - - Get the index of the union case amongst the cases - - - - - Get the definition range of the union case - - - - - Get the name of this union case - - - - - Get the attributes associated with the union case - - - - - Get the fields of the union case - - - - - Get a field of the union case by index - - - - - Represents a reference to a case of a union type - - - - - Indicates a reference to something bound in another CCU - - - - - Indicates a reference to something bound in this CCU - - - - - Get or set the signature for the value's XML documentation - - - - - Get the declared documentation for the value - - - - - Records the "extra information" for a value compiled as a method. - - This indicates the number of arguments in each position for a curried function. - - - - - The type of the value. May be a TType_forall for a generic value. - May be a type variable or type containing type variables during type inference. - - - - - Dereference the ValRef to a Val option. - - - - - The parent type or module, if any (ParentNone for expression bindings type parameters) - - - - - Get the type of the value after removing any generic type parameters - - - - - A unique stamp within the context of this invocation of the compiler process - - - - - The quotation expression associated with a value given the [<ReflectedDefinition>] tag - - - - - Get the information about a recursive value used during type inference - - - - - Get the public path to the value, if any? Should be set if type only if - IsMemberOrModuleBinding is set. - - - - - Get the name of the value, assuming it is compiled as a property. - - If this is a property then this is 'Foo' - - If this is an implementation of an abstract slot then this is the name of the property implemented by the abstract slot - - - - - Indicates if this value allows the use of an explicit type instantiation (i.e. does it itself have explicit type arguments, - or does it have a signature?) - - - - - Get the number of 'this'/'self' object arguments for the member. Instance extension members return '1'. - - - - - Indicates whether the inline declaration for the value indicate that the value must be inlined? - - - - - Is this a member, if so some more data about the member. - - - - - Get the apparent parent entity for a member - - - - - Indicates if this is inferred to be a method or function that definitely makes no critical tailcalls? - - - - - The value of a value or member marked with [<LiteralAttribute>] - - - - - Indicates if this value was declared to be a type function, e.g. "let f<'a> = typeof<'a>" - - - - - Indicates whether this value represents a property setter. - - - - - Indicates whether this value represents a property getter. - - - - - Indicates if this value was a member declared 'override' or an implementation of an interface slot - - - - - Indicates if this value is declared 'mutable' - - - - - Indicates if this is an F#-defined value in a module, or an extension member, but excluding compiler generated bindings from optimizations - - - - - Indicates if this is a 'this' value for a member? - - - - - Is this a member definition or module definition? - - - - - Indicates if this is a member - - - - - Indicates if this is an F#-defined instance member. - - Note, the value may still be (a) an extension member or (b) type abstract slot without - a true body. These cases are often causes of bugs in the compiler. - - - - - Indicates if this is a member generated from the de-sugaring of 'let' function bindings in the implicit class syntax? - - - - - Indicates if this is a constructor member generated from the de-sugaring of implicit constructor for a class type? - - - - - Indicates if this is an F#-defined extension member - - - - - Indicates if this member is an F#-defined dispatch slot. - - - - - Indicates if this is a 'this' value for an implicit ctor? - - - - - Indicates if this is an F#-defined 'new' constructor member - - - - - Indicates whether this value was generated by the compiler. - - Note: this is true for the overrides generated by hash/compare augmentations - - - - - 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. - - - - - Indicates if this is a 'base' value? - - - - - Get the inline declaration on the value - - - - - Get the inline declaration on a parameter or other non-function-declaration value, used for optimization - - - - - Gets the dispatch slots implemented by this method, either 0 or 1 - - - - - Get the type of the value including any generic type parameters - - - - - The display name of the value or method but without operator names decompiled type without backticks etc. - - This is very close to LogicalName except that properties have get_ removed and - interface implementation methods report the name of the implemented method. - - Note: avoid using this, we would like to remove it. All uses should be code-reviewed and - gradually eliminated in favour of DisplayName, DisplayNameCore or LogicalName. - - Note: here "Core" means "without added backticks or parens" - Note: here "Mangled" means "op_Addition" - - - If this is a property --> Foo - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an active pattern --> |A|_| - - If this is an operator --> op_Addition - - If this is an identifier needing backticks --> A-B - - - - - The display name of the value or method with operator names decompiled but without backticks etc. - - Note: here "Core" means "without added backticks or parens" - - - - - The full text for the value to show in error messages type to use in code. - This includes backticks, parens etc. - - - If this is a property --> Foo - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an active pattern --> (|A|_|) - - If this is an operator --> (+) - - If this is an identifier needing backticks --> ``A-B`` - - If this is a base value --> base - - If this is a value named ``base`` --> ``base`` - - - - - Dereference the ValRef to a Val. - - - - - Get the actual parent entity for the value (a module or a type), i.e. the entity under which the - value will appear in compiled code. For extension members this is the module where the extension member - is declared. - - This may fail for expression-bound values and parameters. - - - - - The name of the method in compiled code (with some exceptions where ilxgen.fs decides not to use a method impl) - - - - - Indicates if this is a 'base' or 'this' value? - - - - - Get the declared attributes for the value - - - - - Get the apparent parent entity for the value, i.e. the entity under with which the - value is associated. For extension members this is the nominal type the member extends. - For other values it is just the actual parent. - - - - - Get the value representing the accessibility of an F# type definition or module. - - - - - References are either local or nonlocal - - - - - Represents a type definition reference in the typed abstract syntax. - - - - - Represents a module-or-namespace reference in the typed abstract syntax. - - - - - Indicates a reference to something bound in another CCU - - - - - Indicates a reference to something bound in this CCU - - - - - The XML documentation sig-string of the entity, if any, to use to lookup an .xml doc file. This also acts - as a cache for this sig-string computation. - - - - - The XML documentation of the entity, if any. If the entity is backed by provided metadata - then this _does_ include this documentation. If the entity is backed by Abstract IL metadata - or comes from another F# assembly then it does not (because the documentation will get read from - an XML file). - - - - - Get the union cases type other union-type information for a type, if any - - - - - Get the union cases for a type, if any, as a list - - - - - Get the union cases for a type, if any - - - - - The information about the r.h.s. of a type definition, if any. For example, the r.h.s. of a union or record type. - - - - - Get the value representing the accessibility of the r.h.s. of an F# type definition. - - - - - The kind of the type definition - is it a measure definition or a type definition? - - - - - The logical contents of the entity when it is a type definition. - - - - - Indicates if this entity is an F# type abbreviation definition - - - - - Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - - - - - The on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - The on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - The on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Dereference the TyconRef to a Tycon option. - - - - - Get a list of all instance fields for F#-defined record, struct type class fields in this type definition, - excluding compiler-generate fields. - - - - - Get a list of all fields for F#-defined record, struct type class fields in this type definition, - including static fields, but excluding compiler-generate fields. - - - - - A unique stamp for this module, namespace or type definition within the context of this compilation. - Note that because of signatures, there are situations where in a single compilation the "same" - module, namespace or type may have two distinct Entity objects that have distinct stamps. - - - - - The signature definition location of the namespace, module or type - - - - - The resolved target of the reference - - - - - The code location where the module, namespace or type is defined. - - - - - Get a blob of data indicating how this type is nested in other namespaces, modules or types. - - - - - Indicates if we have pre-determined that a type definition has a default constructor. - - - - - The logical contents of the entity when it is a module or namespace fragment. - - - - - Gets the immediate members of an F# type definition, excluding compiler-generated ones. - Note: result is alphabetically sorted, then for each name the results are in declaration order - - - - - Gets all immediate members of an F# type definition keyed by name, including compiler-generated ones. - Note: result is a indexed table, type for each name the results are in reverse declaration order - - - - - The name of the namespace, module or type, possibly with mangling, e.g. List`1, List or FailureException - - - - - Indicate if this is a type whose r.h.s. is known to be a union type definition. - - - - - Indicates if this entity is an F# type abbreviation definition - - - - - Indicates if this is a struct or enum type definition, i.e. a value type definition, including struct records and unions - - - - - Indicates if the entity is an erased provided type definition that incorporates a static instantiation (type therefore in some sense compiler generated) - - - - - Indicates if the reference has been resolved - - - - - Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition. - - - - - Indicates if the entity is a provided namespace fragment - - - - - Indicates if the entity is a generated provided type definition, i.e. not erased. - - - - - Indicates if the entity is an erased provided type definition - - - - - Indicates if the entity is a provided namespace fragment - - - - - Indicates the type prefers the "tycon<a, b>" syntax for display etc. - - - - - Indicates if the entity is a namespace - - - - - Indicates the "tycon blob" is actually a module - - - - - Indicates if the entity is an F# module definition - - - - - Indicates if this is an F# type definition which is one of the special types in FSharp.Core.dll like 'float<_>' which - defines a measure type with a relation to an existing non-measure type as a representation. - - - - - Indicates if the reference is a local reference - - - - - Indicate if this is a type definition backed by Abstract IL metadata. - - - - - Indicates if this is a .NET-defined struct or enum type definition, i.e. a value type definition - - - - - Indicates if this is a .NET-defined enum type definition - - - - - Indicates if this is an F# type definition whose r.h.s. definition is unknown (i.e. a traditional ML 'abstract' type in a signature, - which in F# is called a 'unknown representation' type). - - - - - Indicates if this is an F#-defined value type definition, including struct records and unions - - - - - Indicates if this is an F# type definition known to be an F# class, interface, struct, - delegate or enum. This isn't generally a particularly useful thing to know, - it is better to use more specific predicates. - - - - - Indicates if this is an F#-defined interface type definition - - - - - Indicates if the entity represents an F# exception declaration. - - - - - Indicates if this is an F#-defined enum type definition - - - - - Indicates if this is an F#-defined delegate type definition - - - - - Indicates if the entity is erased, either a measure definition, or an erased provided type definition - - - - - Indicates if this is an enum type definition - - - - - Indicates if this is an F# type definition which is one of the special types in FSharp.Core.dll which uses - an assembly-code representation for the type, e.g. the primitive array type constructor. - - - - - Gets the immediate interface definitions of an F# type definition. Further interfaces may be supported through class type interface inheritance. - - - - - Gets the immediate interface types of an F# type definition. Further interfaces may be supported through class type interface inheritance. - - - - - The identifier at the point of declaration of the type definition. - - - - - Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata. - - - - - Get the Abstract IL scope, nesting type metadata for this - type definition, assuming it is backed by Abstract IL metadata. - - - - - Indicates if we have pre-determined that a type definition has a self-referential constructor using 'as x' - - - - - Gets any implicit hash/equals (with comparer argument) methods added to an F# record, union or struct type definition. - - - - - Gets any implicit hash/equals methods added to an F# record, union or struct type definition. - - - - - Gets any implicit CompareTo (with comparer argument) methods added to an F# record, union or struct type definition. - - - - - Gets any implicit CompareTo methods added to an F# record, union or struct type definition. - - - - - Get the blob of information associated with an F# object-model type definition, i.e. class, interface, struct etc. - - - - - The information about the r.h.s. of an F# exception definition, if any. - - - - - The display name of the namespace, module or type with <_, _, _> added for generic types, including static parameters - - Backticks are added implicitly for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, including static parameters - - Backticks are added implicitly for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, not including static parameters - - No backticks are added for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, not including static parameters - - Backticks are added implicitly for entities with non-identifier names - - - - - Dereference the TyconRef to a Tycon. Amortize the cost of doing this. - This path should not allocate in the amortized case - - - - - Demangle the module name, if FSharpModuleWithSuffix is used - - - - - The implementation definition location of the namespace, module or type - - - - - Gets the data indicating the compiled representation of a named type or module in terms of Abstract IL data structures. - - - - - Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures. - - - - - Get the cache of the compiled ILTypeRef representation of this module or type. - - - - - The compiled name of the namespace, module or type, e.g. FSharpList`1, ListModule or FailureException - - - - - Get a blob of data indicating how this type is nested inside other namespaces, modules type types. - - - - - Get a blob of data indicating how this type is nested inside other namespaces, modules type types. - - - - - Is the destination assembly available? - - - - - The F#-defined custom attributes of the entity, if any. If the entity is backed by Abstract IL or provided metadata - then this does not include any attributes from those sources. - - - - - Get a list of all instance fields for F#-defined record, struct type class fields in this type definition. - including hidden fields from the compilation of implicit class constructions. - - - - - Get a list of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get an array of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get a table of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get the value representing the accessibility of an F# type definition or module. - - - - - Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - - Lazy because it may read metadata, must provide a context "range" in case error occurs reading metadata. - - - - - Set the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - Set the on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - Set the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Resolve the reference - - - - - Get a union case of a type by name - - - - - Get a field by name. - - - - - Get a field by index in definition order - - - - - Get the path into the CCU referenced by the nonlocal reference. - - - - - Get the mangled name of the last item in the path of the nonlocal reference. - - - - - Get the all-but-last names of the path of the nonlocal reference. - - - - - Dereference the nonlocal reference, type raise an error if this fails. - - - - - Get the CCU referenced by the nonlocal reference. - - - - - Get the name of the assembly referenced by the nonlocal reference. - - - - - Try to find the entity corresponding to the given path, using type-providers to link the data - - - - - Try to find the entity corresponding to the given path in the given CCU - - - - - Try to link a non-local entity reference to an actual entity - - - - - Represents an index into the namespace/module structure of an assembly - - - - - Represents the path information for a reference to a value or member in another assembly, disassociated - from any particular reference. - - - - - The name of the value, or the full signature of the member - - - - - A reference to the entity containing the value or member. This will always be a non-local reference - - - - - For debugging - - - - - Get the thunk for the assembly referred to - - - - - Get the name of the assembly referred to - - - - - For debugging - - - - - Gets updated with 'true' if an abstract slot is implemented in the file being typechecked. Internal only. - - - - - Updated with the full implemented slotsig after interface implementation relation is checked - - - - - The parent type. For an extension member this is the type being extended - - - - - Represents the extra information stored for a member - - - - - See vflags section further below for encoding/decodings here - - - - - Mutable for unpickle linkage - - - - - Mutable for unpickle linkage - - - - - Mutable for unpickle linkage - - - - -Get the signature for the value's XML documentation - - - - -Get the signature for the value's XML documentation - - - - - Get the declared documentation for the value - - - - - Records the "extra information" for display purposes for expression-level function definitions - that may be compiled as closures (that is are not necessarily compiled as top-level methods). - - - - - Records the "extra information" for a value compiled as a method. - - This indicates the number of arguments in each position for a curried - functions, type relates to the F# spec for arity analysis. - For module-defined values, the currying is based - on the number of lambdas, type 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. - - - - - The type of the value. - May be a TType_forall for a generic value. - May be a type variable or type containing type variables during type inference. - - - - - Get the generic type parameters for the value - - - - - The parent type or module, if any (None for expression bindings type parameters) - - - - - Get the type of the value after removing any generic type parameters - - - - - A unique stamp within the context of this invocation of the compiler process - - - - - Range of the definition (signature) of the value, used by Visual Studio - - - - - The quotation expression associated with a value given the [<ReflectedDefinition>] tag - - - - - Get the information about the value used during type inference - - - - - The place where the value was defined. - - - - - Get the public path to the value, if any? Should be set if type only if - IsMemberOrModuleBinding is set. - - - - - The name of the property. - - If this is a property then this is 'Foo' - - - - - Indicates if this value allows the use of an explicit type instantiation (i.e. does it itself have explicit type arguments, - or does it have a signature?) - - - - - Get the number of 'this'/'self' object arguments for the member. Instance extension members return '1'. - - - - - Indicates whether the inline declaration for the value indicate that the value must be inlined? - - - - - Is this a member, if so some more data about the member. - - Note, the value may still be (a) an extension member or (b) type abstract slot without - a true body. These cases are often causes of bugs in the compiler. - - - - - Get the apparent parent entity for a member - - - - - Indicates if this is inferred to be a method or function that definitely makes no critical tailcalls? - - - - - The name of the method. - - If this is a property then this is 'get_Foo' or 'set_Foo' - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an extension member then this will be the simple name - - - - - The value of a value or member marked with [<LiteralAttribute>] - - - - - Indicates if this value was a member declared 'override' or an implementation of an interface slot - - - - - Indicates if this is declared 'mutable' - - - - - Indicates if this is an F#-defined value in a module, or an extension member, but excluding compiler generated bindings from optimizations - - - - - Indicates if this is a 'this' value for a member? - - - - - Is this a member definition or module definition? - - - - - Indicates if this is a member - - - - - Indicates if a value is linked to backing data yet. Only used during unpickling of F# metadata. - - - - - Indicates if this is a member, excluding extension members - - - - - Indicates if this is an F#-defined instance member. - - Note, the value may still be (a) an extension member or (b) type abstract slot without - a true body. These cases are often causes of bugs in the compiler. - - - - - Indicates if this is a member generated from the de-sugaring of 'let' function bindings in the implicit class syntax? - - - - - Indicates if this is a constructor member generated from the de-sugaring of implicit constructor for a class type? - - - - - Indicates if the value is pinned/fixed - - - - - Indicates if this is an F#-defined extension member - - - - - Indicates if this member is an F#-defined dispatch slot. - - - - - Indicates if this is a 'this' value for an implicit ctor? - - - - - Indicates if this is an F#-defined 'new' constructor member - - - - - Indicates whether this value was generated by the compiler. - - Note: this is true for the overrides generated by hash/compare augmentations - - - - - Indicates if this is something compiled into a module, i.e. a user-defined value, an extension member or a compiler-generated value - - - - - 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) - - - - - Indicates if the backing field for a static value is suppressed. - - - - - Indicates if this is a compiler-generated class constructor member - - - - - Indicates if this is a 'base' value? - - - - - Get the inline declaration on the value - - - - - Get the inline declaration on a parameter or other non-function-declaration value, used for optimization - - - - - Gets the dispatch slots implemented by this method - - - - - Indicates if the value will ignore byref scoping rules - - - - - Indicates if the value has a signature file counterpart - - - - - Indicates if this is ever referenced? - - - - - Indicates that this value's getter or setter are generated by the compiler - - - - - Get the type of the value including any generic type parameters - - - - - The display name of the value or method but without operator names decompiled type without backticks etc. - - This is very close to LogicalName except that properties have get_ removed and - interface implementation methods report the name of the implemented method. - - Note: avoid using this, we would like to remove it. All uses should be code-reviewed and - gradually eliminated in favour of DisplayName, DisplayNameCore or LogicalName. - - Note: here "Core" means "without added backticks or parens" - Note: here "Mangled" means "op_Addition" - - - If this is a property --> Foo - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an active pattern --> |A|_| - - If this is an operator --> op_Addition - - If this is an identifier needing backticks --> A-B - - - - - The display name of the value or method with operator names decompiled but without backticks etc. - - Note: here "Core" means "without added backticks or parens" - - - - - The full text for the value to show in error messages type to use in code. - This includes backticks, parens etc. - - - If this is a property --> Foo - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an active pattern --> (|A|_|) - - If this is an operator --> (+) - - If this is an identifier needing backticks --> ``A-B`` - - If this is a base value --> base - - If this is a value named ``base`` --> ``base`` - - - - - Range of the definition (implementation) of the value, used by Visual Studio - - - - - Get the actual parent entity for the value (a module or a type), i.e. the entity under which the - value will appear in compiled code. For extension members this is the module where the extension member - is declared. - - - - - Indicates if this is a 'base' or 'this' value? - - - - - Get the declared attributes for the value - - - - - Records the "extra information" for parameters in implementation files if we've been able to correlate - them with lambda arguments. - - - - - Get the apparent parent entity for the value, i.e. the entity under with which the - value is associated. For extension members this is the nominal type the member extends. - For other values it is just the actual parent. - - - - - How visible is this value, function or member? - - - - - Set all the data on a value - - - - - Create a new value with empty, unlinked data. Only used during unpickling of F# metadata. - - - - - Create a new value with the given backing data. Only used during unpickling of F# metadata. - - - - - Link a value based on empty, unlinked data to the given data. Only used during unpickling of F# metadata. - - - - - The partial information used to index the methods of all those in a ModuleOrNamespace. - - - - - The full information used to identify a specific overloaded method amongst all those in a ModuleOrNamespace. - - - - - The name of the method in compiled code (with some exceptions where ilxgen.fs decides not to use a method impl) - - If this is a property then this is 'get_Foo' or 'set_Foo' - - If this is an implementation of an abstract slot then this may be a mangled name - - If this is an extension member then this will be a mangled name - - If this is an operator then this is 'op_Addition' - - - - - 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 collection of values. - - - - - XML documentation signature for the value - - - - - Is the value actually an instance method/property/event that augments - a type, type if so what name does it take in the IL? - MUTABILITY: for unpickle linkage - - - - - the signature xml doc for an item in an implementation file. - - - - - XML documentation attached to a value. - MUTABILITY: for unpickle linkage - - - - - How visible is this? - MUTABILITY: for unpickle linkage - - - - - Records the "extra information" for parameters in implementation files if we've been able to correlate - them with lambda arguments. - - - - - Records the "extra information" for display purposes for expression-level function definitions - that may be compiled as closures (that is are not necessarily compiled as top-level methods). - - - - - Records the "extra information" for a value compiled as a method (rather - than a closure or a local), including argument names, attributes etc. - - - - - What is the original, unoptimized, closed-term definition, if any? - Used to implement [<ReflectedDefinition>] - - - - - If this field is populated, this is the implementation range for an item in a signature, otherwise it is - the signature range for an item in an implementation - - - - - MUTABILITY: for unpickle linkage - - - - - The full type of the value for the purposes of linking. May be None for non-members, since they can't be overloaded. - - - - - The partial information used to index the value in a ModuleOrNamespace. - - - - - The full information used to identify a specific overloaded method - amongst all those in a ModuleOrNamespace. - - - - - Indicates the total argument count of the member. - - - - - Indicates the logical name of the member. - - - - - Indicates if the member is an override. - - - - - The name of the type with which the member is associated. None for non-member values. - - - - - The partial information used to index the methods of all those in a ModuleOrNamespace. - - - - - Indicates a trait is solved by a 'fake' instance of an operator, like '+' on integers - - - - - ClosedExprSln expr - - Indicates a trait is solved by an erased provided expression - - - - - ILMethSln(ty, extOpt, ilMethodRef, minst) - - Indicates a trait is solved by a .NET method. - ty -- the type type its instantiation - extOpt -- information about an extension member, if any - ilMethodRef -- the method that solves the trait constraint - minst -- the generic method instantiation - staticTyOpt -- the static type governing a static virtual call, if any - - - - - Indicates a trait is solved by an F# anonymous record field. - - - - - FSRecdFieldSln(tinst, rfref, isSetProp) - - Indicates a trait is solved by an F# record field. - tinst -- the instantiation of the declaring type - rfref -- the reference to the record field - isSetProp -- indicates if this is a set of a record field - - - - - FSMethSln(ty, vref, minst) - - Indicates a trait is solved by an F# method. - ty -- the type type its instantiation - vref -- the method that solves the trait constraint - staticTyOpt -- the static type governing a static virtual call, if any - minst -- the generic method instantiation - - - - - Represents the solution of a member constraint during inference. - - - - - Indicates the signature of a member constraint. Contains a mutable solution cell - to store the inferred solution of the constraint. - - - - - Get or set the solution of the member constraint during inference - - - - - Get the types that may provide solutions for the traits - - - - - Get or set the solution of the member constraint during inference - - - - - Get the member name associated with the member constraint. For preop - - - - - Get the member flags associated with the member constraint. - - - - - Get the return type recorded in the member constraint. - - - - - Get the raw object and argument types recorded in the member constraint. This includes the object instance type - instance members. This may be empty for property traits e.g. - "(static member Zero: ^T)" - or unit-taking methods - "(static member get_Zero: unit -> ^T)" - See also extension members GetCompiledArgumentTypes and GetLogicalArgumentTypes - - - - - The member kind is irrelevant to the logical properties of a trait. However it adjusts - the extension property MemberDisplayNameCore - - - - - The specification of a member constraint that must be solved - - - - - Get the return type recorded in the member constraint. - - - - - Get the member name associated with the member constraint. - - - - - A constraint that a type is .NET unmanaged type - - - - - A constraint that a type is a delegate from the given tuple of args to the given return type - - - - - A constraint that a type does not have the Equality(false) attribute, or is not a structural type with this attribute, with special rules for some known structural container types - - - - - A constraint that a type implements IComparable, with special rules for some known structural container types - - - - - A constraint that a type is an enum with the given underlying - - - - - A constraint that a type has a parameterless constructor - - - - - A constraint that a type is a simple choice between one of the given ground types. Only arises from 'printf' format strings. See format.fs - - - - - A constraint that a type is a reference type - - - - - A constraint that a type is a non-Nullable value type - These are part of .NET's model of generic constraints, type in order to - generate verifiable code we must attach them to F# generalized type variables as well. - - - - - A constraint that a type has a member with the given signature - - - - - A constraint that a type has a 'null' value - - - - - A constraint for a default value for an inference type variable should it be neither generalized nor solved - - - - - A constraint that a type is a subtype of the given type - - - - - Represents a constraint on a type parameter or type - - - - - The optional data for the type parameter - - - - - A cached TAST type used when this type variable is used as type. - - - - - An inferred equivalence for a type inference variable. - - - - - The unique stamp of the type parameter - MUTABILITY: for linking when unpickling - - - - - The flag data for the type parameter - - - - - MUTABILITY: we set the names of generalized inference type parameters to make the look nice for IL code generation - The identifier for the type parameter - - - - - Get the XML documetnation for the type parameter - - - - - Indicates if the type variable has a static "head type" requirement, i.e. ^a variables used in FSharp.Core type member constraints. - - - - - The unique stamp of the type parameter - - - - - The inferred equivalence for the type inference variable, if any. - - - - - Indicates if the type variable can be solved or given new constraints. The status of a type variable - generally always evolves towards being either rigid or solved. - - - - - The range of the identifier for the type parameter definition - - - - - The name of the type parameter - - - - - Indicates whether a type variable can be instantiated by types or units-of-measure. - - - - - Indicates if a type variable has been solved. - - - - - Indicates if a type variable has been linked. Only used during unpickling of F# metadata. - - - - - Indicates if the type inference variable was generated after an error when type checking expressions or patterns - - - - - Indicates whether a type variable is erased in compiled .NET IL code, i.e. whether it is a unit-of-measure variable - - - - - Indicates if the type variable is compiler generated, i.e. is an implicit type inference variable - - - - - Indicates that whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) - - - - - The identifier for a type parameter definition - - - - - Get the IL name of the type parameter - - - - - Indicates that whether or not a generic type definition satisfies the equality constraint is dependent on whether this type variable satisfies the equality constraint. - - - - - Indicates if a type parameter is needed at runtime type may not be eliminated - - - - - Indicates the display name of a type variable - - - - - The inferred constraints for the type inference variable, if any - - - - - Indicates that whether or not a generic type definition satisfies the comparison constraint is dependent on whether this type variable satisfies the comparison constraint. - - - - - The declared attributes of the type parameter. Empty for type inference variables type parameters from .NET. - - - - - Links a previously unlinked type variable to the given data. Only used during unpickling of F# metadata. - - - - - Sets whether a type variable has a static requirement - - - - - Sets the rigidity of a type variable - - - - - Set whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) - - - - - Sets the identifier associated with a type variable - - - - - Set the IL name of the type parameter - - - - - Sets whether the equality constraint of a type definition depends on this type variable - - - - - Sets whether a type variable is required at runtime - - - - - Adjusts the constraints associated with a type variable - - - - - Sets whether a type variable is compiler generated - - - - - Sets whether the comparison constraint of a type definition depends on this type variable - - - - - Set the attributes on the type parameter - - - - - Creates a type variable that contains empty data, type is not yet linked. Only used during unpickling of F# metadata. - - - - - Creates a type variable based on the given data. Only used during unpickling of F# metadata. - - - - - Links a previously unlinked type variable to the given data. Only used during unpickling of F# metadata. - - - - - A declared generic type/measure parameter, or a type/measure inference variable. - - - - - The declared attributes of the type parameter. Empty for type inference variables. - - - - - The inferred constraints for the type parameter or inference variable. - - - - - The documentation for the type parameter. Empty for inference variables. - MUTABILITY: for linking when unpickling - - - - - MUTABILITY: we set the names of generalized inference type parameters to make the look nice for IL code generation - The storage for the IL name for the type parameter. - - - - - Represents less-frequently-required data about a type parameter of type inference variable - - - - - Indicates the construct can only be accessed from any code in the given type constructor, module or assembly. [] indicates global scope. - - - - - Represents the constraint on access for a construct - - - - - Represents a type or exception definition in the typed AST - - - - - Represents a module or namespace definition in the typed AST - - - - - Get a table of types defined within this module, namespace or type. The - table is indexed by both name type generic arity. This means that for generic - types "List`1", the entry (List, 1) will be present. - - - - - Get a table of types defined within this module, namespace or type. The - table is indexed by both name and, for generic types, also by mangled name. - - - - - Get a list of types defined within this module, namespace or type. - - - - - Get a list of type type exception definitions defined within this module, namespace or type. - - - - - Get a table of nested module type namespace fragments indexed by demangled name (so 'ListModule' becomes 'List') - - - - - Namespace or module-compiled-as-type? - - - - - Get a list of module type namespace definitions defined within this module, namespace or type. - - - - - Get a table of F# exception definitions indexed by demangled name, so 'FailureException' is indexed by 'Failure' - - - - - Get a list of F# exception definitions defined within this module, namespace or type. - - - - - Get a table of values indexed by logical name - - - - - Get a table of values type members indexed by partial linkage key, which includes name, the mangled name of the parent type (if any), - type the method argument count (if any). - - - - - Compute a table of values type members indexed by logical name. - - - - - Values, including members in F# types in this module-or-namespace-fragment. - - - - - Get a table of entities indexed by both logical name - - - - - Get a table of entities indexed by both logical type compiled names - - - - - Type, mapping mangled name to Tycon, e.g. - - - - - Get a table of the active patterns defined in this module. - - - - - Try to find the member with the given linkage key in the given module. - - - - - Return a new module or namespace type with a value added. - - - - - Mutation used in hosting scenarios to hold the hosted types in this module or namespace - - - - - Mutation used during compilation of FSharp.Core.dll - - - - - Return a new module or namespace type with an entity added. - - - - - Represents the contents of of a module of namespace - - - - - Indicates that an exception is abstract, i.e. is in a signature file, type we do not know the representation - - - - - Indicates that an exception carries the given record of values - - - - - Indicates that an exception is shorthand for the given .NET exception type - - - - - Indicates that an exception is an abbreviation for the given exception - - - - - Represents the implementation of an F# exception definition. - - - - - If this field is populated, this is the implementation range for an item in a signature, otherwise it is - the signature range for an item in an implementation - - - - - Name/declaration-location of the field - - - - - Attributes attached to generated field - - - - - Attributes attached to generated property - - - - - Indicates the declared visibility of the field, not taking signatures into account - - - - - The default initialization info, for static literals - - - - - Indicates a compiler generated field, not visible to Intellisense or name resolution - - - - - Indicates a volatile field - - - - - Indicates a static field - - - - - The type of the field, w.r.t. the generic parameters of the enclosing type constructor - - - - - XML Documentation signature for the field - - - - - Documentation for the field from signature file - - - - - Documentation for the field - - - - - Is the field declared mutable in F#? - - - - - Get or set the XML documentation signature for the field - - - - - Get or set the XML documentation signature for the field - - - - - XML Documentation signature for the field - - - - - Get the signature location of the field - - - - - Get the declaration location of the field - - - - - Attributes attached to generated property - - - - - Name of the field - - - - - The default initialization info, for static literals - - - - - Indicates if the field is zero-initialized - - - - - Indicates a volatile field - - - - - Indicates a static field - - - - - Is the field declared mutable in F#? - - - - - Indicates a compiler generated field, not visible to Intellisense or name resolution - - - - - Name/declaration-location of the field - - - - - The type of the field, w.r.t. the generic parameters of the enclosing type constructor - - - - - Attributes attached to generated field - - - - - Name of the field. For fields this is the same as the logical name. - - - - - Name of the field - - - - - Get the definition location of the field - - - - - Indicates the declared visibility of the field, not taking signatures into account - - - - - Represents a class, struct, record or exception field in an F# type, exception or union-case definition. - This may represent a "field" in either a struct, class, record or union. - - - - - Attributes, attached to the generated static method to make instances of the case - - - - - Indicates the declared visibility of the union constructor, not taking signatures into account - - - - - If this field is populated, this is the implementation range for an item in a signature, otherwise it is - the signature range for an item in an implementation - - - - - Name/range of the case - - - - - XML documentation signature for the case - - - - - Documentation for the case from signature file - - - - - Documentation for the case - - - - - Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it - - - - - Data carried by the case. - - - - - Get the signature location of the union case - - - - - Get the full array of fields of the union case - - - - - Get the full list of fields of the union case - - - - - Get the declaration location of the union case - - - - - Get the logical name of the union case - - - - - Indicates if the union case has no fields - - - - - Get the core of the display name of the union case - - Backticks and parens are not added for non-identifiers. - - Note logical names op_Nil type op_ColonColon become [] and :: respectively. - - - - - Get the display name of the union case - - Backticks are added for non-identifiers. - - Note logical names op_Nil and op_ColonColon become ([]) and (::) respectively. - - - - - Get the definition location of the union case - - - - - Get the name of the case in generated IL code. - Note logical names `op_Nil` type `op_ColonColon` become `Empty` type `Cons` respectively. - This is because this is how ILX union code gen expects to see them. - - - - - Get a field of the union case by name - - - - - Get a field of the union case by position - - - - - Represents a union case in an F# type definition - - - - - The ILX data structure representing the discriminated union. - - - - - The cases contained in the discriminated union. - - - - - Get the union cases as a list - - - - - Represents the union cases type related information in an F# type definition - - - - - The cases of the discriminated union, indexed by name. - - - - - The cases of the discriminated union, in declaration order. - - - - - Get the union cases as a list - - - - - Get a union case by index - - - - - Represents union cases in an F# type definition - - - - - The fields of the record, indexed by name. - - - - - The fields of the record, in declaration order. - - - - - Get all non-compiler-generated instance fields as a list - - - - - Get all non-compiler-generated fields as a list - - - - - Get all the fields as a list - - - - - Get a field by name - - - - - Get a field by index - - - - - Represents record fields in an F# type definition - - - - - The fields of the class, struct or enum - - - - - The declared abstract slots of the class, interface or struct - - - - - Indicates whether the type declaration is an F# class, interface, enum, delegate or struct - - - - - Indicates the cases of a union type - - - - - Represents member values type class fields relating to the F# object model - - - - - Indicates the type is an F#-declared enumeration - - - - - Indicates the type is an F#-declared delegate with the given Invoke signature - - - - - Indicates the type is an F#-declared struct - - - - - Indicates the type is an F#-declared interface - - - - - Indicates the type is an F#-declared class (also used for units-of-measure) - - - - - Indicates the type is an F#-declared union - - - - - Indicates the type is an F#-declared record - - - - - Indicates the type is generated, but type-relocation is suppressed - - - - - Indicates the type is erased - - - - - A flag read from the provided type type used to compute basic properties of the type definition. - Reading is delayed, since it looks at the .BaseType - - - - - A type read from the provided type type used to compute basic properties of the type definition. - Reading is delayed, since it does an import on the underlying type - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - The base type of the type. We use it to compute the compiled representation of the type for erased types. - Reading is delayed, since it does an import on the underlying type - - - - - The underlying System.Type (wrapped as a ProvidedType to make sure we don't call random things on - System.Type, type wrapped as Tainted to make sure we track which provider this came from, for reporting - error messages) - - - - - The parameters given to the provider that provided to this type. - - - - - Indicates if the provided type is generated, i.e. not erased - - - - - Gets the base type of an erased provided type - - - - - The information kept about a provided type - - - - - The 'NoRepr' value here has four meanings: - (1) it indicates 'not yet known' during the first 2 phases of establishing type definitions - (2) it indicates 'no representation', i.e. 'type X' in signatures - (3) it is the setting used for exception definitions (!) - (4) it is the setting used for modules type namespaces. - - It would be better to separate the "not yet known" type other cases out. - The information for exception definitions should be folded into here. - - - - - Indicates the representation information for a provided namespace. - - - - - TProvidedTypeRepr - - Indicates the representation information for a provided type. - - - - - Indicates the type is parameterized on a measure (e.g. float<_>) but erases to some other type (e.g. float) - - - - - Indicates the type is implemented as IL assembly code using the given closed Abstract IL type - - - - - Indicates the type is a type from a .NET assembly without F# metadata. - - - - - Indicates the type is a class, struct, enum, delegate or interface - - - - - The information for the contents of a type. Also used for a provided namespace. - - - - - Set to true if the type is determined to be abstract - - - - - Set to true at the end of the scope where proper augmentations are allowed - - - - - Super type, if any - - - - - Interface implementations - boolean indicates compiler-generated - - - - - Properties, methods etc. as lookup table - - - - - Properties, methods etc. in declaration order. The boolean flag for each indicates if the - member is known to be an explicit interface implementation. This must be computed and - saved prior to remapping assembly information. - - - - - 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 - - - - - 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. - - - - - 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. - - - - - 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. - - - - - 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. - - - - - An AbstractIL type representation that may include type variables - - - - - An AbstractIL type representation that is just the name of a type. - - CompiledTypeRepr.ILAsmNamed (ilTypeRef, ilBoxity, ilTypeOpt) - - The ilTypeOpt is present for non-generic types. It is an ILType corresponding to the first two elements of the case. This - prevents reallocation of the ILType each time we need to generate it. For generic types, it is None. - - - - - Specifies the compiled representations of type type exception definitions. Basically - just an ILTypeRef. Computed type cached by later phases. Stored in - type type exception definitions. Not pickled. Store an optional ILType object for - non-generic types. - - - - - Represents the declaring entity of a type definition, if any - - - - - Used during codegen to hold the ILX representation indicating how to access the type - - - - - The stable path to the type, e.g. Microsoft.FSharp.Core.FSharpFunc`2 - - - - - The stable path to the type, e.g. Microsoft.FSharp.Core.FSharpFunc`2 - - - - - This field is used when the 'tycon' is really a module definition. It holds statically nested type definitions type nested modules - - - - - The methods type properties of the type - - - - - The declared representation of the type, i.e. record, union, class etc. - - - - - The declared attributes for the type - - - - - The declaration location for the type constructor - - - - - The name of the type, possibly with `n mangling - - - - - The unique stamp of the "tycon blob". Note the same tycon in signature type implementation get different stamps - - - - - The declared type parameters of the type - - - - - The XML documentation sig-string of the entity, if any, to use to lookup an .xml doc file. This also acts - as a cache for this sig-string computation. - - - - - The XML documentation sig-string of the entity, if any, to use to lookup an .xml doc file. This also acts - as a cache for this sig-string computation. - - - - - The XML documentation of the entity, if any. If the entity is backed by provided metadata - then this _does_ include this documentation. If the entity is backed by Abstract IL metadata - or comes from another F# assembly then it does not (because the documentation will get read from - an XML file). - - - - - Get the union cases type other union-type information for a type, if any - - - - - Get the union cases for a type, if any, as a list - - - - - Get the union cases for a type, if any - - - - - The information about the r.h.s. of a type definition, if any. For example, the r.h.s. of a union or record type. - - - - - Get the value representing the accessibility of the r.h.s. of an F# type definition. - - - - - The kind of the type definition - is it a measure definition or a type definition? - - - - - The logical contents of the entity when it is a type definition. - - - - - Get the type abbreviated by this type definition, if it is an F# type abbreviation definition - - - - - Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - - - - - These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - The on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - These two bits represents the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Get a list of all instance fields for F#-defined record, struct type class fields in this type definition, - excluding compiler-generate fields. - - - - - Get a list of all fields for F#-defined record, struct type class fields in this type definition, - including static fields, but excluding compiler-generate fields. - - - - - A unique stamp for this module, namespace or type definition within the context of this compilation. - Note that because of signatures, there are situations where in a single compilation the "same" - module, namespace or type may have two distinct Entity objects that have distinct stamps. - - - - - The code location where the module, namespace or type is defined. - - - - - Get a blob of data indicating how this type is nested in other namespaces, modules or types. - - - - - Indicates if we have pre-determined that a type definition has a default constructor. - - - - - The logical contents of the entity when it is a module or namespace fragment. - - - - - Gets the immediate members of an F# type definition, excluding compiler-generated ones. - Note: result is alphabetically sorted, then for each name the results are in declaration order - - - - - Gets all immediate members of an F# type definition keyed by name, including compiler-generated ones. - Note: result is a indexed table, type for each name the results are in reverse declaration order - - - - - The name of the namespace, module or type, possibly with mangling, e.g. List`1, List or FailureException - - - - - Indicate if this is a type whose r.h.s. is known to be a union type definition. - - - - - Indicates if this entity is an F# type abbreviation definition - - - - - Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition that is a value type. - - - - - Indicates if this is a struct or enum type definition, i.e. a value type definition, including struct records and unions - - - - - Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition. - - - - - Indicates if the entity is a provided namespace fragment - - - - - Indicates if the entity is a generated provided type definition, i.e. not erased. - - - - - Indicates if the entity is an erased provided type definition - - - - - Indicates if the entity is a provided type or namespace definition - - - - - Indicates the type prefers the "tycon<a, b>" syntax for display etc. - - - - - Indicates if the entity is a namespace - - - - - Indicates the Entity is actually a module or namespace, not a type definition - - - - - Indicates if the entity is an F# module definition - - - - - Indicates if this is an F# type definition which is one of the special types in FSharp.Core.dll like 'float<_>' which - defines a measure type with a relation to an existing non-measure type as a representation. - - - - - Indicates if the entity is linked to backing data. Only used during unpickling of F# metadata. - - - - - Indicates if the entity has an implicit namespace - - - - - Indicate if this is a type definition backed by Abstract IL metadata. - - - - - Indicates if this is a .NET-defined struct or enum type definition - - - - - Indicates if this is a .NET-defined enum type definition - - - - - Indicates if this is an F# type definition whose r.h.s. definition is unknown (i.e. a traditional ML 'abstract' type in a signature, - which in F# is called a 'unknown representation' type). - - - - - Indicates if this is an F#-defined value type definition, including struct records and unions - - - - - Indicates if this is an F# type definition known to be an F# class, interface, struct, - delegate or enum. This isn't generally a particularly useful thing to know, - it is better to use more specific predicates. - - - - - Indicates if this is an F#-defined interface type definition - - - - - Indicates if the entity represents an F# exception declaration. - - - - - Indicates if this is an F#-defined enum type definition - - - - - Indicates if this is an F#-defined delegate type definition - - - - - Indicates if this is an F#-defined class type definition - - - - - Indicates if the entity is erased, either a measure definition, or an erased provided type definition - - - - - Indicates if this is an enum type definition - - - - - Indicates if this is an F# type definition which is one of the special types in FSharp.Core.dll which uses - an assembly-code representation for the type, e.g. the primitive array type constructor. - - - - - Gets the immediate interface definitions of an F# type definition. Further interfaces may be supported through class type interface inheritance. - - - - - Gets the immediate interface types of an F# type definition. Further interfaces may be supported through class type interface inheritance. - - - - - The identifier at the point of declaration of the type definition. - - - - - Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata. - - - - - Get the Abstract IL scope, nesting type metadata for this - type definition, assuming it is backed by Abstract IL metadata. - - - - - Indicates if the value has a signature file counterpart - - - - - Indicates if we have pre-determined that a type definition has a self-referential constructor using 'as x' - - - - - Gets any implicit hash/equals (with comparer argument) methods added to an F# record, union or struct type definition. - - - - - Gets any implicit hash/equals methods added to an F# record, union or struct type definition. - - - - - Gets any implicit CompareTo (with comparer argument) methods added to an F# record, union or struct type definition. - - - - - Gets any implicit CompareTo methods added to an F# record, union or struct type definition. - - - - - Get the blob of information associated with an F# object-model type definition, i.e. class, interface, struct etc. - - - - - The information about the r.h.s. of an F# exception definition, if any. - - - - - The display name of the namespace, module or type with <_, _, _> added for generic types, plus static parameters if any - For modules the Module suffix is removed if FSharpModuleWithSuffix is used. - - Backticks are added implicitly for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, including static parameters if any - For modules the Module suffix is removed if FSharpModuleWithSuffix is used. - - Backticks are added implicitly for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, type no static parameters. - For modules the Module suffix is removed if FSharpModuleWithSuffix is used. - - No backticks are added for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, type no static parameters - For modules the Module suffix is removed if FSharpModuleWithSuffix is used. - - Backticks are added implicitly for entities with non-identifier names - - - - - Demangle the module name, if FSharpModuleWithSuffix is used - - - - - The range in the implementation, adjusted for an item in a signature - - - - - Gets the data indicating the compiled representation of a named type or module in terms of Abstract IL data structures. - - - - - Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures. - - - - - Get the cache of the compiled ILTypeRef representation of this module or type. - - - - - The compiled name of the namespace, module or type, e.g. FSharpList`1, ListModule or FailureException - - - - - Get a blob of data indicating how this type is nested inside other namespaces, modules type types. - - - - - Get a blob of data indicating how this type is nested inside other namespaces, modules type types. - - - - - The F#-defined custom attributes of the entity, if any. If the entity is backed by Abstract IL or provided metadata - then this does not include any attributes from those sources. - - - - - Get a list of all instance fields for F#-defined record, struct type class fields in this type definition. - including hidden fields from the compilation of implicit class constructions. - - - - - Gets all implicit hash/equals/compare methods added to an F# record, union or struct type definition. - - - - - Get a list of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get an array of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get a table of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get the value representing the accessibility of an F# type definition or module. - - - - - Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - - Lazy because it may read metadata, must provide a context "range" in case error occurs reading metadata. - - - - - Sets the structness of a record or union type definition - - - - - Set the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - Set the on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - Set the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Set the custom attributes on an F# type definition. - - - - - Create a new entity with empty, unlinked data. Only used during unpickling of F# metadata. - - - - - Create a new entity with the given backing data. Only used during unpickling of F# metadata. - - - - - Link an entity based on empty, unlinked data to the given data. Only used during unpickling of F# metadata. - - - - - Get a union case of a type by name - - - - - Get a field by name. - - - - - Get a field by index in definition order - - - - - Represents a type definition, exception definition, module definition or namespace definition. - - - - - Field used when the 'tycon' is really an exception definition - - - - - Indicates how visible is the entity is. - - - - - The declared accessibility of the representation, not taking signatures into account - - - - - If non-None, indicates the type is an abbreviation for another type. - - - - - The XML document signature for this entity - - - - - the signature xml doc for an item in an implementation file. - - - - - The declared documentation for the type or module - - - - - If this field is populated, this is the implementation range for an item in a signature, otherwise it is - the signature range for an item in an implementation - - - - - The name of the type, possibly with `n mangling - - - - - String 'Module' off an F# module name, if FSharpModuleWithSuffix is used - - - - - The information ILXGEN needs about the location of an item - - - - - A public path records where a construct lives within the global namespace - of a CCU. - - - - - Indicates that the sourcecode had a namespace. - If false, this namespace was implicitly constructed during type checking. - - - - - Indicates that a 'module' is really a namespace - - - - - Indicates that a module is compiled to a class with the same name as the original module - - - - - Indicates that a module is compiled to a class with the "Module" suffix added. - - - - - These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - These two bits represents the on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - These two bits represents the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - This bit is reserved for us in the pickle format, see pickle.fs, it's being listed here to stop it ever being used for anything else - - - - - Get the flags as included in the F# binary metadata - - - - - This bit represents a F# record that is a value type, or a struct record. - - - - - Indicates the type prefers the "tycon<a, b>" syntax for display etc. - - - - - Indicates the Entity is actually a module or namespace, not a type definition - - - - - Adjust the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - Adjust the on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - Adjust the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Encode entity flags into a bit field. We leave lots of space to allow for future expansion. - - - - - Indicates if the type variable has a static "head type" requirement, i.e. ^a variables used in FSharp.Core type member constraints. - - - - - Indicates if the type variable can be solved or given new constraints. The status of a type variable - generally always evolves towards being either rigid or solved. - - - - - Get the flags as included in the F# binary metadata. We pickle this as int64 to allow for future expansion - - - - - Indicates whether a type variable can be instantiated by types or units-of-measure. - - - - - Indicates if the type inference variable was generated after an error when type checking expressions or patterns - - - - - Indicates if the type variable is compiler generated, i.e. is an implicit type inference variable - - - - - Indicates that whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) - - - - - Indicates that whether or not a generic type definition satisfies the equality constraint is dependent on whether this type variable satisfies the equality constraint. - - - - - Indicates if a type parameter is needed at runtime type may not be eliminated - - - - - Indicates that whether or not a generic type definition satisfies the comparison constraint is dependent on whether this type variable satisfies the comparison constraint. - - - - - Encode typar flags into a bit field - - - - - Indicates the type parameter derives from an '_' anonymous type - For units-of-measure, we give a warning if this gets solved to '1' - - - - - Indicates the type parameter is an inference variable may be solved - - - - - Indicates we give a warning if the type parameter is ever solved - - - - - Indicates the type parameter can't be solved, but the variable is not set to "rigid" until after inference is complete - - - - - Indicates the type parameter can't be solved - - - - - Indicates if the type variable can be solved or given new constraints. The status of a type variable - evolves towards being either rigid or solved. - - - - - Represents the kind of a type parameter - - - - - Get the flags as included in the F# binary metadata - - - - - Flags on values - - - - - Indicates the 'this' value specified in a memberm e.g. 'x' in 'member x.M() = 1' - - - - - Indicates a normal value - - - - - Indicates the value called 'base' available for calling base class members - - - - - Indicates a ref-cell holding 'this' or the implicit 'this' used throughout an - implicit constructor to access type set values - - - - - Indicates the type parameter is needed at runtime type may not be eliminated - - - - - Indicates the type parameter is not needed at runtime type may be eliminated - - - - - Indicates if a type parameter is needed at runtime type may not be eliminated - - - - - The normal value for this flag when the value is not within its recursive scope - - - - - Set while the value is within its recursive scope. The flag indicates if the value has been eagerly generalized type accepts generic-recursive calls - - - - - A flag associated with values that indicates whether the recursive scope of the value is currently being processed, type - if the value has been generalized or not as yet. - - - - - Indicates the value must never be inlined by the optimizer - - - - - Indicates the value may optionally be inlined by the optimizer - - - - - Indicates the value is inlined but the .NET IL code for the function still exists, e.g. to satisfy interfaces on objects, but that it is also always inlined - - - - - Returns true if the implementation of a value must always be inlined - - - - - Defines the typed abstract syntax intermediate representation used throughout the F# compiler. - - - - - Given (newPath, oldPath) replace oldPath by newPath in the TAccess. - - - - - Primitive routine to compare two ValRef's for equality. On the whole value identity is not particularly - significant in F#. However it is significant for - (a) Active Patterns - (b) detecting uses of "special known values" from FSharp.Core.dll, such as 'seq' - and quotation splicing - - Note this routine doesn't take type forwarding into account - - - - - Primitive routine to compare two UnionCaseRef's for equality - - - - - Primitive routine to compare two EntityRef's for equality - This takes into account the possibility that they may have type forwarders - - - - - Compare two EntityRef's for equality when compiling fslib (FSharp.Core.dll) - - - - - 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. - - - - - From Ref_private to Ref_nonlocal when exporting data. - - - - - From Ref_private to Ref_nonlocal when exporting data. - - - - - Detect a use of a nominal type, including type abbreviations. - - - - - Make a reference to a union case for type in a module or namespace - - - - - For dereferencing in the middle of a pattern - - - - - Equality on CCU references, implemented as reference equality except when unresolved - - - - - Equality on value specs, implemented as reference equality - - - - - Equality on type variables, implemented as reference equality. This should be equivalent to using typarEq. - - - - - Metadata on values (names of arguments etc. - - - - - Indicates if we can use System.Array.Empty when emitting IL for empty array literals - - - - - Memoization table to help minimize the number of ILSourceDocument objects we create - - - - - Are we assuming all code gen is for F# interactive, with no static linking - - - - - Indicates if we can use System.Array.Empty when emitting IL for empty array literals - - - - - Indicates if we are generating witness arguments for SRTP constraints. Only done if the FSharp.Core - supports witness arguments. - - - - - Find an FSharp.Core operator that corresponds to a trait witness - - - - - Find an FSharp.Core LaguagePrimitives dynamic function that corresponds to a trait witness, e.g. - AdditionDynamic for op_Addition. Also work out the type instantiation of the dynamic function. - - - - - For debugging - - - - - For debugging - - - - - For debugging - - - - - For debugging - - - - - Represents an intrinsic value from FSharp.Core known to the compiler - - - - - Defines the global environment for all type checking. - - The environment (TcGlobals) are well-known 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. - - - - - An immutable mappping from witnesses to some data. - - Note: this uses an immutable HashMap/Dictionary with an IEqualityComparer that captures TcGlobals, see EmptyTraitWitnessInfoHashMap - - - - - Represents metadata extracted from a nominal type - - - - - A set of function parameters (visitor) for folding over expressions - - - - - The empty table representing no hiding - - - - - A set of tables summarizing the items hidden by a signature - - - - - The list of corresponding modules, namespaces and type definitions - - - - - The list of corresponding values - - - - - The empty table - - - - - 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. - - - - - 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.fs - - 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. - - - - - Indicate what should happen to value definitions when copying expressions - - - - - A flag to govern whether ValReprInfo inference should be type-directed or syntax-directed when - inferring from a lambda expression. - - - - - If set, signatures will be rendered with XML documentation comments for members if they exist - Defaults to false, expected use cases include things like signature file generation. - - - - - Force the suffix style: int List - - - - - Force the prefix style: List<int> - - - - - Use the IsPrefixDisplay member of the TyCon to determine the style - - - - - Describes how generic type parameters in a type will be formatted during printing - - - - - During backend code generation of state machines, register a template replacement for struct types. - This may introduce new free variables related to the instantiation of the struct type. - - - - - Represents the options to activate when collecting free variables - - - - - Represents a combination of substitutions/instantiations where things replace other things during remapping - - - - - Represents an instantiation where value references replace other value references - - - - - Represents an instantiation where type definition references replace other type definition references - - - - - Represents an instantiation where types replace type parameters - - - - - The empty map - - - - - Make a new map, containing a entries for the given type definitions - - - - - Fetch the entries for the given type definition - - - - - Make a new map, containing a new entry for the given type definition - - - - - Maps TyconRef to list of T based on stamp keys - - - - - Get the entry for the given type definition - - - - - Determine if the map is empty - - - - - The empty map - - - - - Try to find the entry for the given type definition - - - - - Remove the entry for the given type definition, if any - - - - - Make a new map, containing entries for the given type definitions - - - - - Determine is the map contains an entry for the given type definition - - - - - Make a new map, containing a new entry for the given type definition - - - - - Maps TyconRef to T based on stamp keys - - - - - Get the entry for the given type parameter - - - - - The empty map - - - - - Try to find the entry for the given type parameter - - - - - Determine is the map contains an entry for the given type parameter - - - - - Make a new map, containing a new entry for the given type parameter - - - - - Maps type parameters to entries based on stamp keys - - - - - Maps Val's to list of T based on stamp keys - - - - - Mutable data structure mapping Val's to T based on stamp keys - - - - - Maps Val to T, based on stamps - - - - - GeneralizedType (generalizedTypars, tauTy) - - generalizedTypars -- the truly generalized type parameters - tauTy -- the body of the generalized type. A 'tau' type is one with its type parameters stripped off. - - - - - Finish the targets - - - - - Build the overall expression - - - - - Add a new destination target - - - - - Add a new destination target that is an expression result - - - - - Create a new builder - - - - - Build decision trees imperatively - - - - - Check if the order of defined typars is different from the order of used typars in the curried arguments. - If this is the case, a generated signature would require explicit typars. - See https://github.com/dotnet/fsharp/issues/15175 - - - - - Updates the IsPrefixDisplay to false for the Microsoft.FSharp.Collections.seq`1 entity - Meant to be called with the FSharp.Core module spec right after it was unpickled. - - - - - Serialize an entity to a very basic json structure. - - - - - Add an System.Runtime.CompilerServices.ExtensionAttribute to the Entity if found via predicate and not already present. - - - - - Matches a ModuleOrNamespaceContents that is empty from a signature printing point of view. - Signatures printed via the typed tree in NicePrint don't print TMDefOpens or TMDefDo. - This will match anything that does not have any types or bindings. - - - - - Get the key associated with the member constraint. - - - - - Get the name of the trait for textual call. - - - - - Get the argument types when the trait is used as a first-class value "^T.TraitName" which can then be applied - - - - - Get the argument types recorded in the member constraint suitable for building a TypedTree call. - - - - - Indicates if an F# type is the type associated with an F# exception declaration - - - - - Detect a 'seq { ... }' expression - - - - - Detect a 'Seq.empty' implicit in the implied 'else' branch of an 'if .. then' in a seq { ... } - - - - - Detect the outer 'Seq.delay' added for a construct 'seq { ... }' - - - - - Detect the de-sugared form of a 'for x in collection do ..' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'use x = ..' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'try .. finally .. ' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'while gd do expr' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'expr; expr' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'yield x' within a 'seq { ... }' - - - - - Determine if a value is a method implementing an interface dispatch slot using a private method impl - - - - - Match an if...then...else expression or the result of "a && b" or "a || b" - - - - - Shared helper for binding attributes - - - - - The delegate type ResumableCode, or any function returning this a delegate type - - - - - Any delegate type with ResumableCode attribute, or any function returning such a delegate type - - - - - Add a label to use as the target for a goto - - - - - Recognise a try-finally expression - - - - - Recognise a try-with expression - - - - - Recognise an integer for-loop expression - - - - - Recognise a while expression - - - - - Recognise a '__resumeAt' expression - - - - - Recognise a '__debugPoint' expression - - - - - Recognise a sequential or binding construct in a resumable code - - - - - Recognise a '__stateMachine' expression - - - - - Recognise a 'match __resumableEntry() with ...' expression - - - - - Match 'if __useResumableCode then ... else ...' expressions - - - - - Match a .Invoke on a delegate - - - - - Match expressions that represent the creation of an instance of an F# delegate value - - - - - Match expressions that are an application of a particular F# function value - - - - - Create an empty immutable mapping from witnesses to some data - - - - - Determines types that are potentially known to satisfy the 'comparable' constraint and returns - a set of residual types that must also satisfy the constraint - - - - - Get the overall type for a function that implements the active pattern - - - - - Get the result type for the active pattern - - - - - Get the display name for one of the cases of the active pattern, by index - - - - - Get the core of the display name for one of the cases of the active pattern, by index - - - - - Build for loops - - - - - Check if the type is a byref-like but not a byref. - - - - - returns Some(assemblyName) for success - - - - - Try to find the AttributeUsage attribute, looking for the value of the AllowMultiple named parameter - - - - - Try to find an attribute with a specific full name on a type definition - - - - - Try to find a specific attribute on a type definition - - - - - Try to find a specific attribute on a type definition, where the attribute accepts a bool argument. - - - - - Try to find a specific attribute on a type definition, where the attribute accepts a string argument. - - This is used to detect the 'DefaultMemberAttribute' and 'ConditionalAttribute' attributes (on type definitions) - - - - - Use an operator as a witness - - - - - Use a witness in BuiltInWitnesses - - - - - Make a call to the 'isprintf' function for string interpolation - - - - - This is used for tacking on code _after_ the expression. The SuppressStmt - setting is used for debug points, suppressing the debug points for the statement if possible. - - - - - This is used for tacking on code _before_ the expression. The SuppressStmt - setting is used for debug points, suppressing the debug points for the statement if possible. - - - - - Create the expression 'None' for an option-type - - - - - Create the expression 'Some(expr)' - - - - - Create the expression 'headExpr:: tailExpr' - - - - - Create the expression '[]' for a list type - - - - - Create the struct union case 'Some' or 'ValueSome(expr)' for a voption type - - - - - Create the struct union case 'ValueSome(expr)' for a voption type - - - - - Create the union case 'Some(expr)' for an option type - - - - - Create the union case 'None' for an option type - - - - - Create the Nullable type for a given element type - - - - - Create the voption type for a given element type - - - - - Create the option type for a given element type - - - - - Create the list type for a given element type - - - - - Create the IEnumerator type for a given element type - - - - - Create the IEnumerable (seq) type for a given element type - - - - - Create the FSharpRef type for a given element type - - - - - Get the element type of an FSharpRef type - - - - - Check if a type is an FSharpRef type - - - - - Matches any byref type, yielding the target type - - - - - An active pattern to transform System.Nullable types to their input, otherwise leave the input unchanged - - - - - An active pattern to match System.Nullable types - - - - - An active pattern to determine if a type is a nominal type, possibly instantiated - - - - - For "type Class as self", 'self' is fixed up after initialization. To support this, - it is converted behind the scenes to a ref. This function strips off the ref and - returns the underlying type. - - - - - Determine if a type is a struct, record or union type - - - - - Determine if a type is a numeric type type - - - - - Determine if a type is a non-decimal numeric type type - - - - - Determine if a type is a decimal type - - - - - Determine if a type is a floating point type - - - - - Determine if a type is an integer type - - - - - Determine if a type is an unsigned integer type - - - - - Determine if a type is a signed integer type - - - - - Determine if a type is an enum type - - - - - Determine if a type is a class type - - - - - Determine if a type is an unmanaged type - - - - - Determine if a type is a variable type with the ': not struct' constraint. - - Note, isRefTy does not include type parameters with the ': not struct' constraint - This predicate is used to detect those type parameters. - - - - - Determine if a type is a variable type with the ': struct' constraint. - - Note, isStructTy does not include type parameters with the ': struct' constraint - This predicate is used to detect those type parameters. - - - - - Determine if a type is a struct type - - - - - Determine if TyconRef is to a struct type - - - - - If the input type is an enum type, then convert to its underlying type, otherwise return the input type - - - - - Determine the underlying type of an enum type (normally int32) - - - - - Determine if a type is a ComInterop type - - - - - Determine if a type is a sealed type - - - - - Determine if a type is a function (including generic). Not the same as isFunTy. - - - - - Determine if a type is a FSharpRef type - - - - - Determine if a type is an interface type - - - - - Determine if a type is a delegate type defined in F# - - - - - Determine if a type is a delegate type - - - - - Determine if a reference to a type definition is an interface type - - - - - Get the rank of an array type - - - - - Get the element type of an array type - - - - - Determine if a type is the System.Void type - - - - - Determine if a type is the System.ValueType type - - - - - Determine if a type is the System.Object type - - - - - Determine if a type is the F# unit type - - - - - Determine the rank of one of the artificial type definitions used for array types - - - - - Check if a type definition is one of the artificial type definitions used for array types of different ranks - - - - - Build an array type of the given rank - - - - - Get the element type of an F# list type - - - - - Get the element type of an array type - - - - - Determine if a type is a single-dimensional array type - - - - - Determine if a type is any kind of array type - - - - - Determine if a type is a nominal .NET type - - - - - Determine if a type is an F# list type - - - - - Determine if a type is the System.String type - - - - - Extract metadata from a type - - - - - Extract metadata from a type definition - - - - - Build an PrintFormat type - - - - - Build an Lazy type - - - - - Build an IObserver type - - - - - Build an IObservable type - - - - - Build an IEvent type - - - - - Take apart an IDelegateEvent type - - - - - Determine if a type is an IDelegateEvent type - - - - - Try to take apart a System.Linq.Expression type - - - - - Take apart a System.Linq.Expression type - - - - - Determine if a type is a System.Linq.Expression type - - - - - Take apart a System.Nullable type - - - - - Try to take apart a System.Nullable type - - - - - Determine is a type is a System.Nullable type - - - - - Try to take apart an option type - - - - - Try to take apart an option type - - - - - Take apart an option type - - - - - Determine if a type is an option type - - - - - Determine if a type is a value option type - - - - - Build a single-dimensional array type - - - - - Build a 'voidptr' type - - - - - Build a nativeptr type - - - - - Extract some statistics from an expression - - - - - Fold over all the expressions in an expression - - - - - Fold over all the expressions in an implementation file - - - - - The empty set of actions for folding over expressions - - - - - Combine two static-resolution requirements on a type parameter - - - - - Make a delegate invoke expression for an F# delegate type, doing beta reduction by introducing let-bindings - if the delegate expression is a construction of a delegate. - - - - - Make an application expression, doing beta reduction by introducing let-bindings - if the function expression is a construction of a lambda - - - - - Given a lambda expression, adjust it to have be one or two lambda expressions (fun a -> (fun b -> ...)) - where the first has the given arguments. - - - - - Given a lambda expression taking multiple variables, build a corresponding lambda taking a tuple - - - - - Work out what things on the right-han-side of a 'let rec' recursive binding need to be fixed up - - - - - Make a 'match' expression without applying any peep-hole optimizations. - - - - - Make a 'match' expression applying some peep-hole optimizations along the way, e.g to - pre-decide the branch taken at compile-time. - - - - - Accumulate the targets actually used in a decision graph (for reporting warnings) - - - - - Build an expression representing the read of an instance class or record field. - First take the address of the record expression if it is a struct. - - - - - Build an expression to take the address of a local - &localv - - - - - Build an expression to dereference a local pointer - *localv_ptr - - - - - Build an expression to mutate the contents of a local pointer - *localv_ptr = e - - - - - Build an expression to mutate a local - localv <- e - - - - - Build the application of a generic construct to a set of type arguments. - Reduce the application via substitution if the function value is a typed lambda expression. - - - - - Build the application of a (possibly generic, possibly curried) function value to a set of type and expression arguments. - Reduce the application via let-bindings if the function value is a lambda expression. - - - - - Build the application of a (possibly generic, possibly curried) function value to a set of type and expression arguments - - - - - Adjust marks in expressions, replacing all marks by the given mark. - Used when inlining. - - - - - Determine if a record field is hidden by a signature - - - - - Determine if a member, function or value is hidden by a signature - - - - - Determine if the representation of a type definition is hidden by a signature - - - - - Determine if a type definition is hidden by a signature - - - - - Make a remapping table for viewing a module or namespace 'from the outside' - - - - - Make the substitution (remapping) table for viewing a module or namespace 'from the outside' - - Given the top-most signatures constrains 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. - - - - - Given a value definition, try to produce a reference to that value. Fails for local values. - - - - - Given a namespace, module or type definition, try to produce a reference to that entity. - - - - - Wrap one module or namespace definition in a 'module M = ..' outer wrapper - - - - - Wrap one module or namespace definition in a 'namespace N' outer wrapper - - - - - Wrap one module or namespace implementation in a 'namespace N' outer wrapper - - - - - Compute the hiding information that corresponds to the hiding applied at an assembly boundary - - - - - Compute the hiding information that corresponds to the hiding applied at an assembly boundary - - - - - Compute the remapping information implied by an explicit signature being given for an inferred signature - - - - - Compute the remapping information implied by a signature being inferred for a particular implementation - - - - - Instantiate the generic type parameters in an expression, building a new one - - - - - Instantiate the generic type parameters in a method slot signature, building a new one - - - - - Copy a method slot signature, including new generic type parameters if the slot signature represents a generic method - - - - - Copy an entire implementation file using the given copying flags - - - - - Copy an entire expression using the given copying flags - - - - - Copy an entire module or namespace type using the given copying flags - - - - - Remap a (possible generic) type using the given remapping substitution - - - - - Remap an attribute using the given remapping substitution - - - - - Remap an expression using the given remapping substitution - - - - - Remap a reference to a value using the given remapping substitution - - - - - Remap a reference to a record field using the given remapping substitution - - - - - Remap a reference to a union case using the given remapping substitution - - - - - Remap a reference to a type definition using the given remapping substitution - - - - - Mutate a value to indicate it should be considered a local rather than a module-bound definition - - - - - Given a lambda binding, extract the ValReprInfo for its arguments and other details - - - - - Given a lambda expression, extract the ValReprInfo for its arguments and other details - - - - - Given a (curried) lambda expression, pull off its arguments - - - - - Compute the type of an expression from the expression itself - - - - - Check if a set of free variables are all public - - - - - Check if a set of free type variables are all public - - - - - Get the free variables in the right hand side of a binding. - - - - - Get the free variables in an expression. - - - - - Get the free variables in a module definition. - - - - - A unique qualified name for each type definition, used to qualify the names of interface implementation methods - - - - - Return the full text for an item as we want it displayed to the user as a fully qualified entity - - - - - Count the number of type parameters on the enclosing type - - - - - Returns (parentTypars,memberParentTypars,memberMethodTypars,memberToParentInst,tinst) - - - - - Returns (parentTypars,memberParentTypars,memberMethodTypars,memberToParentInst,tinst) - - - - - Returns (parentTypars,memberParentTypars,memberMethodTypars,memberToParentInst,tinst) - - - - - Try to get a TyconRef for a type without erasing type abbreviations - - - - - See through F# exception abbreviations - - - - - set bool to 'true' to allow shortcutting of type parameter equation chains during stripping - - - - - From typars to types - - - - - Equality for value references - - - - - Equality for type definition references - - - - - An ordering for type parameters, based on stamp - - - - - An ordering for record fields, based on stamp - - - - - An ordering for type definitions, based on stamp - - - - - An ordering for value definitions, based on stamp - - - - - 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. - - - - - Helper to take the address of an expression - - - - - Helper to create an expression that dereferences an address. - - - - - If it is a tuple type, ensure it's outermost type is a .NET tuple type, otherwise leave unchanged - - - - - Evaluate the AnonRecdTypeInfo to work out if it is a struct or a ref. - - - - - Evaluate the TupInfo to work out if it is a struct or a ref. Currently this is very simple - but TupInfo may later be used carry variables that infer structness. - - - - - Make a TAST expression representing getting an item fromm a tuple - - - - - Convert from F# tuple creation expression to .NET tuple creation expressions - - - - - Convert from F# tuple types to .NET tuple types. - - - - - Get a TyconRef for a .NET tuple type - - - - - Check if a TyconRef is for a .NET tuple type. Currently this includes Tuple`1 even though - that' not really part of the target set of TyconRef used to represent F# tuples. - - - - - The number of fields in the largest tuple before we start encoding, i.e. 7 - - - - - The largest tuple before we start encoding, i.e. 7 - - - - - Make an expression that gets the address of an element in an array - - - - - Make an expression that sets an instance field in an F# exception value - - - - - Make an expression that gets an instance field from an F# exception value - - - - - Like mkUnionCaseFieldGetUnprovenViaExprAddr, but for struct-unions, the input should be a copy of the expression. - - - - - Build a 'TOp.UnionCaseFieldSet' expression. For ref-unions, the input expression has 'TType_ucase', which is - an F# compiler internal "type" corresponding to the union case. For struct-unions, - the input should be the address of the expression. - - - - - Build a 'TOp.UnionCaseFieldGetAddr' expression for a field of a union when we've already determined the value to be a particular union case. For ref-unions, - the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, - the input should be the address of the expression. - - - - - Build a 'TOp.UnionCaseFieldGetAddr' expression for a field of a union when we've already determined the value to be a particular union case. For ref-unions, - the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, - the input should be the address of the expression. - - - - - Build a 'TOp.UnionCaseFieldGet' expression for something we've already determined to be a particular union case. For ref-unions, - the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, - the input should be the address of the expression. - - - - - Make a 'TOp.UnionCaseProof' expression, which proves a union value is over a particular case (used only for ref-unions, not struct-unions) - - - - - Make an expression that gets the tag of a union value (via the address of the value if it is a struct) - - - - - Make an expression that sets an instance the field of a record or class (via the address of the value if it is a struct) - - - - - Make an expression that gets the address of a static field in a record or class - - - - - Make an expression that sets a static field in a record or class - - - - - Make an expression that gets a static field from a record or class - - - - - Make an expression that gets the address of an instance field from a record or class (via the address of the value if it is a struct) - - - - - Make an expression that gets an instance field from a record or class (via the address of the value if it is a struct) - - - - - Make an expression that gets an item from an anonymous record (via the address of the value if it is a struct) - - - - - Make an expression that gets an item from an anonymous record - - - - - Make an expression that gets an item from a tuple - - - - - Make an expression that re-raises an exception via a library call - - - - - Make an expression that re-raises an exception - - - - - Make an expression that coerces one expression to another type - - - - - Make an expression that is IL assembly code - - - - - Make an expression that constructs an exception value - - - - - Make an expression that constructs a union case, e.g. 'Some(expr)' - - - - - Make an out-byref type with an out kind parameter - - - - - Make a in-byref type with a in kind parameter - - - - - Make a byref type with a in/out kind inference parameter - - - - - Make a byref type - - - - - Make the expression corresponding to 'expr1 || expr2' - - - - - Make the expression corresponding to 'expr1 && expr2' - - - - - Test if the type parameter is one of those being generalized by a type scheme. - - - - - Make the right-hand side of a generalized binding, incorporating the generalized generic parameters from the type - scheme into the right-hand side as type generalizations. - - - - - Make a let-rec expression that locally binds values to expressions where self-reference back to the values is possible. - - - - - Make a set of bindings that bind values to expressions in an "invisible" way. - Invisible bindings are not given a sequence point and should not have side effects. - - - - - Make a binding that binds a value to an expression in an "invisible" way. - Invisible bindings are not given a sequence point and should not have side effects. - - - - - Make a let-expression that locally binds a value to an expression in an "invisible" way. - Invisible bindings are not given a sequence point and should not have side effects. - - - - - Make a let-expression that locally binds a compiler-generated value to an expression, where the expression - is returned by the given continuation. Compiler-generated bindings do not give rise to a sequence point in debugging. - - - - - Make a let-expression that locally binds a compiler-generated value to an expression. - Compiler-generated bindings do not give rise to a sequence point in debugging. - - - - - Make a set of bindings that bind compiler generated values to corresponding expressions. - Compiler-generated bindings do not give rise to a sequence point in debugging. - - - - - Make a binding that binds a function value to a lambda taking multiple arguments - - - - - Build a user-level let expression - - - - - Build a user-level value sequence of let bindings - - - - - Build a user-level value sequence of let bindings - - - - - Build a user-level let-binding - - - - - Build a user-level value binding - - - - - Build a 'try/finally' expression - - - - - Build a 'try/with' expression - - - - - Build a 'for' loop expression - - - - - Build a 'while' loop expression - - - - - Build a lambda expression that corresponds to the implementation of a member - - - - - Build an iterated generic (type abstraction + tupled+curried) lambda expression - - - - - Build an iterated (tupled+curried) lambda expression - - - - - Build an iterated (curried) lambda expression - - - - - Build an type-chose expression, indicating that a local free choice of a type variable - - - - - Build an object expression - - - - - Build a generic lambda expression (type abstraction) - - - - - Build a lambda expression taking a single value - - - - - Rebuild a lambda during an expression tree traversal - - - - - Build a lambda expression taking multiple values - - - - - Make a new mutable compiler-generated local value, 'let' bind it to an expression - 'invisibly' (no sequence point etc.), and build an expression to reference it - - - - - Make a new mutable compiler-generated local value and build an expression to reference it - - - - - Make a new compiler-generated local value and build an expression to reference it - - - - - Make a new local value and build an expression to reference it - - - - - Build an expression corresponding to the use of a reference to a value - - - - - Build an expression corresponding to the use of a value - Note: try to use exprForValRef or the expression returned from mkLocal instead of this. - - - - - Build an if-then statement - - - - - Build a conditional expression that checks for non-nullness - - - - - Build a conditional expression - - - - - Build a conditional expression - - - - - Add an if-then-else boolean conditional node into a decision tree - - - - - Look for a use of an F# value, possibly including application of a generic thing to a set of type arguments - - - - - Get the values for a set of bindings - - - - - Match any 'Expr.Link' and 'Expr.DebugPoint' in an expression, providing the inner expression and a function to rebuild debug points - - - - - Ignore 'Expr.Link' and 'Expr.DebugPoint' in an expression - - - - - Ignore 'Expr.Link' in an expression - - - - - Module publication, used while compiling fslib. - - - - - Get the curried type corresponding to a lambda - - - - - Get the type corresponding to a lambda - - - - - Get the natural type of a single argument amongst a set of curried arguments - - - - - Build a curried function type - - - - - Build a type-forall anonymous generic type if necessary - - - - - Build a function type - - - - - Reduce a type to its more canonical form subject to an erasure flag, inference equations and abbreviations - - - - - Get the unit of measure for an annotated type - - - - - Check the equivalence of two units-of-measure - - - - - Check the equivalence of two types - - - - - Check the equivalence of two types up to an erasure flag - - - - - An exception representing a warning for a defensive copy of an immutable struct - - - - - Debug layout for class and record fields - - - - - Debug layout for a list of implementation files - - - - - Debug layout for an implementation file - - - - - Debug layout for a decision tree - - - - - Debug layout for a type definition - - - - - Debug layout for an expression - - - - - Debug layout for a binding of an expression to a value - - - - - Debug layout for a module or namespace definition - - - - - Debug layout for a method slot signature - - - - - Debug layout for a type - - - - - Debug layout for a set of type parameters - - - - - Debug layout for a type parameter - - - - - Debug layout for a trait constraint - - - - - Debug layout for a type parameter definition - - - - - Debug layout for a value definition - - - - - Debug layout for an integer - - - - - Debug layout for an value definition at its binding site - - - - - Debug layout for a reference to a union case - - - - - Debug layout for a reference to a value - - - - - Convert an expression to a string for debugging purposes - - - - - Convert a type to a string for debugging purposes - - - - - A global flag indicating whether debug output should include type information - - - - - A global flag indicating whether debug output should include ranges - - - - - A global flag indicating whether debug output should include stamps of Val and Entity - - - - - A global flag indicating whether debug output should include ValReprInfo - - - - - Layout for internal compiler debugging purposes - - - - - Utilities used in simplifying types for visual presentation - - - - - same as PrettifyTypes, but allows passing the types along with a discriminant value - useful to prettify many types that need to be sorted out after prettifying operation - took place. - - - - - Assign previously generated pretty names to typars - - - - - Defines derived expression manipulation and construction functions. - - - - - A function to read a value from a given state - - - - - The type of state unpicklers read from - - - - - A function to pickle a value into a given stateful writer - - - - - The type of state written to by picklers - - - - - The assumptions that need to be fixed up - - - - - The data that uses a collection of CcuThunks internally - - - - - Like Fixup but loader may return None, in which case there is no fixup. - - - - - Represents deserialized data with a dangling set of CCU fixup thunks indexed by name - - - - - Deserialize an arbitrary object which may have holes referring to other compilation units - - - - - Deserialize a TAST description of a compilation unit - - - - - Deserialize a TAST type - - - - - Deserialize a TAST expression - - - - - Deserialize a TAST union case reference - - - - - Deserialize a TAST type reference - - - - - Deserialize a TAST value reference - - - - - Deserialize a TAST constant - - - - - Deserialize a namemap - - - - - Deserialize an array of values - - - - - Deserialize a tuple - - - - - Deserialize a tuple - - - - - Deserialize a tuple - - - - - Deserialize a lazy value (eagerly) - - - - - Deserialize a string - - - - - Deserialize an integer - - - - - Deserialize a bool - - - - - Deserialize a byte - - - - - Serialize an arbitrary object using the given pickler - - - - - Serialize a TAST description of a compilation unit - - - - - Serialize a TAST type - - - - - Serialize a TAST expression - - - - - Serialize a TAST union case reference - - - - - Serialize a TAST type or entity reference - - - - - Serialize a TAST value reference - - - - - Serialize a TAST constant - - - - - Serialize a namemap of data - - - - - Serialize an array of data - - - - - Serialize a tuple of data - - - - - Serialize a tuple of data - - - - - Serialize a tuple of data - - - - - Serialize a lazy value (eagerly) - - - - - Serialize a string - - - - - Serialize an integer - - - - - Serialize a boolean value - - - - - Serialize a byte - - - - - Defines the framework for serializing and de-serializing TAST data structures as binary blobs for the F# metadata format. - - - - - The Typars of a Val in the signature data should also be pretty named. - This will happen for the implementation file contents, but not for the signature data. - In this module some helpers will traverse the ModuleOrNamespaceType and update all the typars of each found Val. - - - - - The TcGlobals for the import context - - - - - The AssemblyLoader for the import context - - - - - Represents a context used for converting AbstractIL .NET and provided types to F# internal compiler data structures. - Also cache the conversion of AbstractIL ILTypeRef nodes, based on hashes of these. - - There is normally only one ImportMap for any assembly compilation, though additional instances can be created - using tcImports.GetImportMap() if needed, and it is not harmful if multiple instances are used. The object - serves as an interface through to the tables stored in the primary TcImports structures defined in CompileOps.fs. - - - - - Record a root for a [<Generate>] type to help guide static linking & type relocation - - - - - Get a flag indicating if an assembly is a provided assembly, plus the - table of information recording remappings from type names in the provided assembly to type - names in the statically linked, embedded assembly. - - - - - Resolve an Abstract IL assembly reference to a Ccu - - - - - Represents an interface to some of the functionality of TcImports, for loading assemblies - and accessing information about generated provided assemblies. - - - - - Import an IL type as an F# type, first rescoping to view the metadata from the current assembly - being compiled. importInst gives the context for interpreting type variables. - - - - - Import the type forwarder table for an IL assembly - - - - - Import an IL assembly as a new TAST CCU - - - - - Import a set of Abstract IL generic parameter specifications as a list of new F# generic parameters. - - - - - Import a provided method reference as an Abstract IL method reference - - - - - Import a provided type as an AbstractIL type - - - - - Import a provided type reference as an F# type TyconRef - - - - - Import a provided type as an F# type. - - - - - Pre-check for ability to import an IL type as an F# type. - - - - - Import an IL type as an F# type. - - - - - Pre-check for ability to import a reference to a type definition, given an AbstractIL ILTypeRef, with caching - - - - - Import a reference to a type definition, given an AbstractIL ILTypeRef, with caching - - - - - Functions to import .NET binary metadata as TAST objects - - - - - Indicates whether we should visit multiple instantiations of the same generic interface or not - - - - - Indicates whether we can skip interface types that lie outside the reference set - - - - - 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<A :> List<B>, B :> List<A>> ... - - - - - 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. ty.M<_>) then we may be both substituting the - instantiation associated with 'ty' as well as copying the type parameters associated with - M and instantiating their constraints - - Note: this now looks identical to constraint instantiation. - - - - - Get the return type of an IL method, taking into account instantiations for type, return attributes and method generic parameters, and - translating 'void' to 'None'. - - - - - Get the parameter type of an IL method. - - - - - Read an Abstract IL type from metadata, including any attributes that may affect the type itself, and convert to an F# type. - - - - - Read an Abstract IL type from metadata and convert to an F# type. - - - - - Check if a type exists somewhere in the hierarchy which has the given head type. - - - - - Check if a type exists somewhere in the hierarchy which has the same head type as the given type (note, the given type need not have a head type at all) - - - - - Check if a type has a particular head type - - - - - Check if two types have the same nominal head type - - - - - Get all interfaces of a type, including the type itself if it is an interface - - - - - Get all super types of the type, including the type itself - - - - - Search for one element where a function returns a 'Some' result, following interfaces - - - - - Search for one element satisfying a predicate, following interfaces - - - - - Iterate, following interfaces. Skipping interfaces that lie outside the referenced assembly set is allowed. - - - - - Fold, following interfaces. Skipping interfaces that lie outside the referenced assembly set is allowed. - - - - - Fold, do not follow interfaces (unless the type is itself an interface) - - - - - Collect the set of immediate declared interface types for an F# type, but do not - traverse the type hierarchy to collect further interfaces. - - - - - Get the base type of a type, taking into account type instantiations. Return None if the - type has no base type. - - - - - Represents the information about the compiled form of a method signature. Used when analyzing implementation - relations between members and abstract slots. - - - - - An F# use of an event backed by provided metadata - - - - - An F# use of an event backed by .NET metadata - - - - - An F# use of an event backed by F#-declared metadata - - - - - Get the intra-assembly XML documentation for the property. - - - - - Get the TcGlobals associated with the object - - - - - Get the 'remove' method associated with an event - - - - - Indicates if the enclosing type for the event is a value type. - - For an extension event, this indicates if the event extends a struct type. - - - - - Indicates if this property is static. - - - - - Indicates if this is an extension member - - - - - Indicates if this event has an associated XML comment authored in this assembly. - - - - - Get the logical name of the event. - - - - - Get the event name in core DisplayName form (no backticks or parens added) - - - - - Get the display name of the event. - - Backticks and parens are added implicitly for non-identifiers. - - - - - Get the declaring type or module holding the method. - Note that C#-style extension properties don't exist in the C# design as yet. - If this is an F#-style extension method it is the logical module - holding the value for the extension method. - - - - - Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - - - - - Get the enclosing type of the event. - - If this is an extension member, then this is the apparent parent, i.e. the type the event appears to extend. - - - - - Get the enclosing type of the method info, using a nominal type for tuple types - - - - - Get the 'add' method associated with an event - - - - - Get the delegate type associated with the event. - - - - - Get custom attributes for events (only applicable for IL events) - - - - - Test whether two event infos have the same underlying definition. - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Calculates a hash code of event info (similar as previous) - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Describes an F# use of an event - - - - - Get the declaring type of the event as an ILTypeRef - - - - - Get the ILMethInfo describing the 'remove' method associated with the event - - - - - Get the raw Abstract IL metadata for the event - - - - - Indicates if the property is static - - - - - Get the declaring IL type of the event as an ILTypeInfo - - - - - Get the name of the event - - - - - Get the enclosing ("parent"/"declaring") type of the field. - - - - - Get the ILMethInfo describing the 'add' method associated with the event - - - - - Describes an F# use of an event backed by Abstract IL metadata - - - - - An F# use of a property backed by provided metadata - - - - - An F# use of a property backed by Abstract IL metadata - - - - - An F# use of a property backed by F#-declared metadata - - - - - Get the intra-assembly XML documentation for the property. - - - - - Get the TcGlobals associated with the object - - - - - Get a MethInfo for the 'setter' method associated with the property - - - - - Get the logical name of the property. - - - - - True if the getter (or, if absent, the setter) is a virtual method - - - - - Indicates if the enclosing type for the property is a value type. - - For an extension property, this indicates if the property extends a struct type. - - - - - Indicates if this property is static. - - - - - Indidcates whether IL property has an init-only setter (i.e. has the `System.Runtime.CompilerServices.IsExternalInit` modifer) - - - - - Is the property requied (has the RequiredMemberAttribute). - - - - - Indicates if the property is logically a 'newslot', i.e. hides any previous slots of the same name. - - - - - Indicates if this property is an indexer property, i.e. a property with arguments. - - - - - Indicates if this is an F# property compiled as a CLI event, e.g. a [<CLIEvent>] property. - - - - - Indicates if this is an extension member - - - - - Indicates if the getter (or, if absent, the setter) for the property is a dispatch slot. - - - - - Indicates if this property is marked 'override' and thus definitely overrides another property. - - - - - Indicates if this property has an associated setter method. - - - - - Indicates if this property has an associated getter method. - - - - - Indicates if this property has an associated XML comment authored in this assembly. - - - - - Get the property name in core DisplayName form (no backticks or parens added) - - - - - Get the display name of the property. - - Backticks and parens are added implicitly for non-identifiers. - - - - - Get the declaring type or module holding the method. - Note that C#-style extension properties don't exist in the C# design as yet. - If this is an F#-style extension method it is the logical module - holding the value for the extension method. - - - - - Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - - - - - Get the enclosing type of the property. - - If this is an extension member, then this is the apparent parent, i.e. the type the property appears to extend. - - - - - Get the enclosing type of the method info, using a nominal type for tuple types - - - - - Test whether two property infos have the same underlying definition. - Uses the same techniques as 'MethInfosUseIdenticalDefinitions'. - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Get the result type of the property - - - - - Get the types of the indexer parameters associated with the property - - - - - Get the names and types of the indexer parameters associated with the property - - If the property is in a generic type, then the type parameters are instantiated in the types returned. - - - - - Get the details of the indexer parameters associated with the property - - - - - Return a new property info where there is no associated setter, only an associated getter. - - Property infos can combine getters and setters, assuming they are consistent w.r.t. 'virtual', indexer argument types etc. - When checking consistency we split these apart - - - - - Return a new property info where there is no associated getter, only an associated setter. - - Property infos can combine getters and setters, assuming they are consistent w.r.t. 'virtual', indexer argument types etc. - When checking consistency we split these apart - - - - - Calculates a hash code of property info. Must be compatible with ItemsAreEffectivelyEqual relation. - - - - - Describes an F# use of a property - - - - - Get the TcGlobals governing this value - - - - - Gets the ILMethInfo of the 'set' method for the IL property - - - - - Get the raw Abstract IL metadata for the IL property - - - - - Get the name of the IL property - - - - - Indicates if the IL property is virtual - - - - - Indicates if the IL property is static - - - - - Is the property requied (has the RequiredMemberAttribute). - - - - - Indicates if the IL property is logically a 'newslot', i.e. hides any previous slots of the same name. - - - - - Get the declaring IL type of the IL property, including any generic instantiation - - - - - Indicates if the IL property has a 'set' method - - - - - Indicates if the IL property has a 'get' method - - - - - Gets the ILMethInfo of the 'get' method for the IL property - - - - - Get the apparent declaring type of the method as an F# type. - If this is a C#-style extension method then this is the type which the method - appears to extend. This may be a variable type. - - - - - Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type - - - - - Get the return type of the IL property. - - Any type parameters of the enclosing type are instantiated in the type returned. - - - - - Get the types of the indexer arguments associated with the IL property. - - Any type parameters of the enclosing type are instantiated in the type returned. - - - - - Get the names and types of the indexer arguments associated with the IL property. - - Any type parameters of the enclosing type are instantiated in the type returned. - - - - - Describes an F# use of a property backed by Abstract IL metadata - - - - - Get a reference to the F# metadata for the uninstantiated union case - - - - - Get the F# metadata for the uninstantiated union case - - - - - Get the list of types for the instantiation of the type parameters of the declaring type of the union case - - - - - Get a reference to the F# metadata for the declaring union type - - - - - Get the F# metadata for the declaring union type - - - - - Get the logical name of the union case. - - - - - Get the core of the display name of the union case - - Backticks and parens are not added for non-identifiers. - - Note logical names op_Nil and op_ColonColon become [] and :: respectively. - - - - - Get the display name of the union case - - Backticks and parens are added implicitly for non-identifiers. - - Note logical names op_Nil and op_ColonColon become ([]) and (::) respectively. - - - - - Get the instantiation of the type parameters of the declaring type of the union case - - - - - Describes an F# use of a union case - - - - - Get the generic instantiation of the declaring type of the field - - - - - Get a reference to the F# metadata for the F#-declared record, class or struct type - - - - - Get the F# metadata for the F#-declared record, class or struct type - - - - - Get a reference to the F# metadata for the uninstantiated field - - - - - Get the F# metadata for the uninstantiated field - - - - - Get the logical name of the field in an F#-declared record, class or struct type - - - - - Indicate if the field is a literal field in an F#-declared record, class or struct type - - - - - Indicate if the field is a static field in an F#-declared record, class or struct type - - - - - Get the (instantiated) type of the field in an F#-declared record, class or struct type - - - - - Get the name of the field, same as LogicalName - Note: no double-backticks added for non-identifiers - - - - - Get the name of the field, with double-backticks added if necessary - - - - - Get the enclosing (declaring) type of the field in an F#-declared record, class or struct type - - - - - Describes an F# use of a field in an F#-declared record, class or struct type - - - - - Represents a single use of a field backed by provided metadata - - - - - Represents a single use of a field backed by Abstract IL metadata - - - - - Get the type instantiation of the declaring type of the field - - - - - Get the scope used to interpret IL metadata - - - - - Indicates if the field is a literal field with an associated literal value - - - - - Indicates if the field is a member of a struct or enum type - - - - - Indicates if the field is static - - - - - Indicates if the field has the 'specialname' property in the .NET IL - - - - - Indicates if the field is readonly (in the .NET/C# sense of readonly) - - - - - Get a reference to the declaring type of the field as an ILTypeRef - - - - - Get the type of the field as an IL type - - - - - Get an (uninstantiated) reference to the field as an Abstract IL ILFieldRef - - - - - Get the name of the field - - - - - Get the core of the display name for the field. This is the same as the logical name. - - - - - Get the enclosing ("parent"/"declaring") type of the field. - - - - - Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type - - - - - Tests whether two infos have the same underlying definition. - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Get the type of the field as an F# type - - - - - Calculates a hash code of field info. Must be compatible with ItemsAreEffectivelyEqual relation. - - - - - Represents a single use of a IL or provided field from one point in an F# program - - - - - Describes a use of a method backed by provided metadata - - - - - Describes a use of a pseudo-method corresponding to the default constructor for a .NET struct type - - - - - Describes a use of a method backed by Abstract IL # metadata - - - - - Describes a use of a method declared in F# code and backed by F# metadata. - - - - - Get the XML documentation associated with the method - - - - - Get the TcGlobals value that governs the method declaration - - - - - Get the information about provided static parameters, if any - - - - - Get a list of argument-number counts, one count for each set of curried arguments. - - For an extension member, drop the 'this' argument. - - - - - Get the method name in LogicalName form, i.e. the name as it would be stored in .NET metadata - - - - - Indicates if the enclosing type for the method is a value type. - - For an extension method, this indicates if the method extends a struct type. - - - - - Indicates if this method is read-only; usually by the [<IsReadOnly>] attribute. - Must be an instance method. - Receiver must be a struct type. - - - - - Indicates if this method takes no arguments - - - - - Does the method appear to the user as an instance method? - - - - - Indicates if this is an IL method. - - - - - Indicates if this is an F#-style extension member. - - - - - Check if this method is an explicit implementation of an interface member - - - - - Indicates if this method is a generated method associated with an F# CLIEvent property compiled as a .NET event - - - - - Indicates if this is an extension member. - - - - - Check if this method is marked 'override' and thus definitely overrides another method. - - - - - Indicates if this is an C#-style extension member. - - - - - Indicates, wheter this method has `IsExternalInit` modreq. - - - - - Indicates if this is a method defined in this assembly with an internal XML comment - - - - - Get the number of generic method parameters for a method. - For an extension method this includes all type parameters, even if it is extending a generic type. - - - - - Get the formal generic method parameters for the method as a list of type variables. - - For an extension method this includes all type parameters, even if it is extending a generic type. - - - - - Get the formal generic method parameters for the method as a list of variable types. - - - - - Get the extension method priority of the method, if it has one. - - - - - Get the extension method priority of the method. If it is not an extension method - then use the highest possible value since non-extension methods always take priority - over extension members. - - - - - Get the method name in core DisplayName form (no backticks or parens added) - - - - - Get the method name in DisplayName form - - - - - Get the actual type instantiation of the declaring type associated with this use of the method. - - For extension members this is empty (the instantiation of the declaring type). - - - - - Get the declaring type or module holding the method. If this is an C#-style extension method then this is the type - holding the static member that is the extension method. If this is an F#-style extension method it is the logical module - holding the value for the extension method. - - - - - Get the method name in DebuggerDisplayForm - - - - - Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - - - - - Get the enclosing type of the method info. - - If this is an extension member, then this is the apparent parent, i.e. the type the method appears to extend. - This may be a variable type. - - - - - Get the enclosing type of the method info, using a nominal type for tuple types - - - - - Tries to get the object arg type if it's a byref type. - - - - - Indicates if this is an extension member (e.g. on a struct) that takes a byref arg - - - - - Tests whether two method infos have the same underlying definition. - Used to merge operator overloads collected from left and right of an operator constraint. - - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Indicates if this method is an extension member that is read-only. - An extension member is considered read-only if the first argument is a read-only byref (inref) type. - - - - - Apply a type instantiation to a method info, i.e. apply the instantiation to the enclosing type. - - - - - Get the ParamData objects for the parameters of a MethInfo - - - - - Get the signature of an abstract method slot. - - - - - Get the parameter types of a method info - - - - - Get the parameter names of a MethInfo - - - - - Get the ParamData objects for the parameters of a MethInfo - - - - - Get the parameter attributes of a method info, which get combined with the parameter names and types - - - - - Get the (zero or one) 'self'/'this'/'object' arguments associated with a method. - An instance method returns one object argument. - - - - - Select all the type parameters of the declaring type of a method. - - For extension methods, no type parameters are returned, because all the - type parameters are part of the apparent type, rather the - declaring type, even for extension methods extending generic types. - - - - - Get the return type of a method info, where 'void' is returned as 'unit' - - - - - Get custom attributes for method (only applicable for IL methods) - - - - - Get the return type of a method info, where 'void' is returned as 'None' - - - - - Build IL method infos. - - - - - Build IL method infos for a C#-style extension method - - - - - Calculates a hash code of method info. Compatible with ItemsAreEffectivelyEqual relation. - - - - - Add the actual type instantiation of the apparent type of an F# extension method. - - - - - Describes an F# use of a method - - - - - Get the Abstract IL metadata associated with the method. - - - - - Get the Abstract IL metadata corresponding to the parameters of the method. - If this is an C#-style extension method then drop the object argument. - - - - - Get the number of parameters of the method - - - - - Get the Abstract IL scope information associated with interpreting the Abstract IL metadata that backs this method. - - - - - Indicates if the IL method is marked virtual. - - - - - Does it appear to the user as a static method? - - - - - Indicates if the method has protected accessibility, - - - - - Does it have the .NET IL 'newslot' flag set, and is also a virtual? - - - - - Does it appear to the user as an instance method? - - - - - Indicates if the method is an extension method - - - - - Indicates if the IL method is marked final. - - - - - Indicates if the method is a constructor - - - - - Indicates if the method is a class initializer. - - - - - Indicates if the IL method is marked abstract. - - - - - Get the IL name of the method - - - - - Get a reference to the method (dropping all generic instantiations), as an Abstract IL ILMethodRef. - - - - - Get the declaring type associated with an extension member, if any. - - - - - Get the formal method type parameters associated with a method. - - - - - Get the instantiation of the declaring type of the method. - If this is an C#-style extension method then this is empty because extension members - are never in generic classes. - - - - - Get the declaring type of the method. If this is an C#-style extension method then this is the IL type - holding the static member that is the extension method. - - - - - Get the apparent declaring type of the method as an F# type. - If this is a C#-style extension method then this is the type which the method - appears to extend. This may be a variable type. - - - - - Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type - - - - - Indicates if the method is marked with the [<IsReadOnly>] attribute. This is done by looking at the IL custom attributes on - the method. - - - - - Indicates if the method is marked as a DllImport (a PInvoke). This is done by looking at the IL custom attributes on - the method. - - - - - Get all the argument types of the IL method. Include the object argument even if this is - an C#-style extension method. - - - - - Get the argument types of the the IL method. If this is an C#-style extension method - then drop the object argument. - - - - - Get info about the arguments of the IL method. If this is an C#-style extension method then - drop the object argument. - - Any type parameters of the enclosing type are instantiated in the type returned. - - - - - Get the (zero or one) 'self'/'this'/'object' arguments associated with an IL method. - An instance extension method returns one object argument. - - - - - Get the F# view of the return type of the method, where 'void' is 'unit'. - - - - - Get the compiled return type of the method, where 'void' is None. - - - - - Describes an F# use of an IL method. - - - - - Get the compiled nominal type. In the case of tuple types, this is a .NET tuple type - - - - - Describes an F# use of an IL type, including the type instantiation associated with the type at a particular usage point. - - - - - Full information about a parameter returned for use by the type checker and language service. - - - - - Partial information about a parameter returned for use by the Language Service - - - - - The argument is optional, and is a caller-side .NET optional or default arg. - Note this is correctly termed caller side, even though the default value is optically specified on the callee: - in fact the default value is read from the metadata and passed explicitly to the callee on the caller side. - - - - - The argument is optional, and is an F# callee-side optional arg - - - - - The argument is not optional - - - - - Compute the OptionalArgInfo for an IL parameter - - This includes the Visual Basic rules for IDispatchConstant and IUnknownConstant and optional arguments. - - - - - Represents information about a parameter indicating if it is optional. - - - - - The caller-side value for the optional arg, if any - - - - - Describes the sequence order of the introduction of an extension method. Extension methods that are introduced - later through 'open' get priority in overload resolution. - - - - - Used to hide/filter members from super classes based on signature - - - - - Used to hide/filter members from base classes based on signature - - - - - Used to hide/filter members from super classes based on signature - - - - - Used to hide/filter members from super classes based on signature - Inref and outref parameter types will be treated as a byref type for equivalency. - - - - - Inref and outref parameter types will be treated as a byref type for equivalency. - - - - - Get the information about the compiled form of a method signature. Used when analyzing implementation - relations between members and abstract slots. - - - - - Strips inref and outref to be a byref. - - - - - Find the delegate type that an F# event property implements by looking through the type hierarchy of the type of the property - for the first instantiation of IDelegateEvent. - - - - - Create an error object to raise should an event not have the shape expected by the .NET idiom described further below - - - - - Construct the data representing the signature of an abstract method slot - - - - - Construct the data representing a parameter in the signature of an abstract method slot - - - - - The slotsig returned by methInfo.GetSlotSig 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 - - - - - Get the return type of a provided method, where 'void' is returned as 'None' - - - - - Check if an F#-declared member value is an explicit interface member implementation - - - - - Check if an F#-declared member value is an 'override' or explicit member implementation - - - - - Check if an F#-declared member value is a dispatch slot - - - - - Check if an F#-declared member value is a virtual method - - - - - Indicates if an F#-declared function or member value is a CLIEvent property compiled as a .NET event - - - - - An exception type used to raise an error using the old error system. - - Error text: "A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events." - - - - - An AccessorDomain which returns all items - - - - - An AccessorDomain which returns everything but .NET private/internal items. - This is used - - when solving member trait constraints, which are solved independently of accessibility - - for failure paths in error reporting, e.g. to produce an error that an F# item is not accessible - - an adhoc use in service.fs to look up a delegate signature - - - - - An AccessorDomain which returns public items - - - - - cpaths: indicates we have the keys to access any members private to the given paths - tyconRefOpt: indicates we have the keys to access any protected members of the super types of 'TyconRef' - - - - - Represents the 'keys' a particular piece of code can use to access other constructs?. - - - - - Compute the accessibility of a provided member - - - - - Indicate if a provided member is accessible - - - - - Indicates if a type is accessible (both definition and instantiation) - - - - - Check that a type definition and its representation contents are accessible - - - - - Indicates if a type definition and its representation contents are accessible - - - - - Check that an entity is accessible - - - - - Indicates if an entity is accessible - - - - - Indicates if an F# item is accessible - - - - - The basic logic of private/internal/protected/InternalsVisibleTo/public accessibility - - - - - Logic associated with checking "ObsoleteAttribute" and other attributes - on items from name resolution - - - - - "Single Feasible Type" inference - Look for the unique supertype of ty2 for which ty2 :> ty1 might feasibly hold - - - - - Adjust a lambda expression to match the argument counts expected in the ValReprInfo - - - - - Break apart lambdas according to a given expected ValReprInfo that the lambda implements. - - - - - Break apart lambdas according to a given expected ValReprInfo that the lambda implements. - - - - - Choose solutions for Expr.TyChoose 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<'T>". - - - - - The feasible coercion relation. Part of the language spec. - - - - - The feasible equivalence relation after stripping Measures. - - - - - The feasible equivalence relation. Part of the language spec. - - - - - The feasible equivalence relation. Part of the language spec. - - - - - Implements a :> b without coercion based on finalized (no type variable) types - - - - - Primary relations on types and signatures, with the exception of - constraint solving and method overload resolution. - - - - - Represents information about the delegate - the Invoke MethInfo, the delegate argument types, the delegate return type - and the overall F# function type for the function type associated with a .NET delegate type - - - - - Try and find a record or class field for a type. - - - - - Perform type-directed name resolution of a particular named member in an F# type - - - - - Check if the given language feature is supported by the runtime. - - - - - Determine if a type has a static abstract method with the given name somewhere in its hierarchy - - - - - Get the trait infos for a type variable (empty for everything else) - - - - - Read the record or class fields of a type, including inherited ones. Cache the result for monomorphic types. - - - - - Read the raw method sets of a type, including inherited ones. Cache the result for monomorphic types - - - - - Get the super-types of a type, excluding interface types. - - - - - Get the flattened list of intrinsic properties in the hierarchy - - - - - Get the sets of intrinsic properties in the hierarchy (not including extension properties) - - - - - Get the flattened list of intrinsic methods in the hierarchy - - - - - Get the sets of intrinsic methods in the hierarchy (not including extension methods) - - - - - Read the IL fields of a type, including inherited ones. Cache the result for monomorphic types. - - - - - Read the events of a type, including inherited ones. Cache the result for monomorphic types. - - - - - Get the super-types of a type, including interface types. - - - - - Find the op_Implicit for a type - - - - - Exclude properties from super types which have the same name as a property in a more specific type. - - - - - Exclude methods from super types which have the same signature as a method in a more specific type. - - - - - Get the declared IL fields of a type, not including inherited fields - - - - - An InfoReader is an object to help us read and cache infos. - We create one of these for each file we typecheck. - - - - - Similar to "IgnoreOverrides", but filters the items bottom-to-top, - and discards all when finds first non-virtual member which hides one above it in hirearchy. - - - - - Get overrides instead of abstract slots when measuring whether a class/interface implements all its required slots. - - - - - Prefer items toward the top of the hierarchy, which we do if the items are virtual - but not when resolving base calls. - - - - - Indicates if we prefer overrides or abstract slots. - - - - - Sets of methods up the hierarchy, ignoring duplicates by name and sig. - Used to collect sets of virtual methods, protected methods, protected - properties etc. - - - - - A helper type to help collect properties. - - Join up getters and setters which are not associated in the F# data structure - - - - - Try to find the xml doc associated with the assembly name and metadata key - - - - - Try to find the name of the metadata file for this external definition - - - - - Indicates if an event info is associated with a delegate type that is a "standard" .NET delegate type - with a sender parameter. - - - - - Try and interpret a delegate type as a "standard" .NET delegate type associated with an event, with a "sender" parameter. - - - - - 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. - - - - - Get a set of most specific override methods. - - - - - Try to find a particular named property on a type. Only used to ensure that local 'let' definitions and property names - are distinct, a somewhat adhoc check in tc.fs. - - - - - Try to detect the existence of a method on a type. - - - - - Perform type-directed name resolution of a particular named member in an F# type - - - - - Get the flattened list of intrinsic properties in the hierarchy - - - - - Get the flattened list of intrinsic methods in the hierarchy - - - - - Get the sets intrinsic properties in the hierarchy (not including extension properties) - - - - - Get the sets of intrinsic methods in the hierarchy (not including extension methods) - - - - - Exclude properties from super types which have the same name as a property in a more specific type. - - - - - Exclude methods from super types which have the same signature as a method in a more specific type. - - - - - Get the declared constructors of any F# type - - - - - From the given method sets, filter each set down to the most specific ones. - - - - - Get the items that are considered the most specific in the hierarchy out of the given items by type. - - - - - Checks whether the given type has an indexer property. - - - - - Query the immediate properties of an F# type, not taking into account inherited properties. The optFilter - parameter is an optional name to restrict the set of properties returned. - - - - - Query the immediate methods of an F# type, not taking into account inherited methods. The optFilter - parameter is an optional name to restrict the set of properties returned. - - - - - Try to select an F# value when querying members, and if so return a MethInfo that wraps the F# value. - - - - - Select members from a type by name, searching the type hierarchy if needed - - - - - Convert a MethInfo to a F# signature - - - - - Print Signatures/Types, for signatures, intellisense, quick info, FSI responses - - - - - This predicate can be used once type inference is complete, before then it is an approximation - that doesn't assert any new constraints - - - - - Generate the hash/compare functions we add to user-defined types by default. - - - - - Notify the sink of the information needed to complete recording a use of a symbol - for the purposes of the language service. One of the callbacks should be called by - the checker. - - The first callback represents a case where we have learned the type - instantiation of a generic method or value. - - The second represents the case where we have resolved overloading and/or - a specific override. The 'Item option' contains the candidate overrides. - - - - - Notification is not needed - - - - - Specifies extra work to do after overload resolution - - - - - Indicates whether we permit a direct reference to a type generator. Only set when resolving the - right-hand-side of a [<Generate>] declaration. - - - - - Indicates if a warning should be given for the use of upper-case identifiers in patterns - - - - - Indicates resolution within an expression, either A.B.C (static) or expr.A.B.C (instance) and - whether we should filter content according to instance/static characteristic. - - - - - Indicates the kind of lookup being performed. Note, this type should be made private to nameres.fs. - - - - - Indicates if a lookup requires a match on the instance/static characteristic. - - This is not supplied at all lookup sites - in theory it could be, but currently diagnostics on many paths - rely on returning all the content and then filtering it later for instance/static characteristic. - - When applied, this also currently doesn't filter all content - it is currently only applied to filter out extension methods - that have a static/instance mismatch. - - - - - Indicates if we only need one result or all possible results from a resolution. - - - - - An abstract type for reporting the results of name resolution and type checking, and which allows - temporary suspension and/or redirection of reporting. - - - - - Get all the uses of all symbols reported to the sink - - - - - Get all the resolutions reported to the sink - - - - - Get all open declarations reported to the sink - - - - - Get the format specifier locations - - - - - Create a TcResultsSinkImpl - - - - - An implementation of ITypecheckResultsSink to collect information during type checking - - - - - Cached line-end normalized source text and an array of line end positions, used for format string parsing - - - - - Get the current source - - - - - Record that an open declaration occured in a given scope range - - - - - Record that a name resolution occurred at a specific location in the source - - - - - Record that a method group name resolution occurred at a specific location in the source - - - - - Record that a printf format specifier occurred at a specific location in the source - - - - - Record that an expression has a specific type at the given range. - - - - - Record that an environment is active over the given scope range - - - - - An abstract type for reporting the results of name resolution and type checking - - - - - Array of line start positions - - - - - Source text - - - - - Source text and an array of line end positions, used for format string parsing - - - - - Empty collection of symbol uses - - - - - All the uses of all items within the file - - - - - Get all the uses of a particular item within the file - - - - - Get the locations of all the printf format specifiers in the file - - - - - Represents container for all name resolutions that were met so far when typechecking some particular file - - - - - Represents the empty set of resolutions - - - - - Exact name resolutions - - - - - Represents additional resolutions of names to groups of methods. - CapturedNameResolutions should be checked when no captured method group is found. - See TypeCheckInfo.GetCapturedNameResolutions for example. - - - - - Information of exact types found for expressions, that can be to the left of a dot. - typ - the inferred type for an expression - - - - - Name resolution environments for every interesting region in the file. These regions may - overlap, in which case the smallest region applicable should be used. - - - - - The starting and ending position - - - - - line and column - - - - - Naming environment--for example, currently open namespaces. - - - - - The active instantiation for any generic type parameters - - - - - Information about the occurrence of the symbol - - - - - Named item - - - - - Information about printing. For example, should redundant keywords be hidden? - - - - - The access rights of code at the location - - - - - Represents the kind of the occurrence when reporting a name in name resolution - - - - - Represents information which guides name resolution of types. - - - - - Indicates definite knowledge of empty type arguments, i.e. the logical equivalent of name< > - - - - - Deduce definite knowledge of type arguments - - - - - Represents information about the generic argument count of a type name when resolving it. - - In some situations we resolve "List" to any type definition with that name regardless of the number - of generic arguments. In others, we know precisely how many generic arguments are needed. - - - - - Indicates we are resolving type names to type definitions - - - - - Indicates we are resolving type names to constructor methods. - - - - - Indicates whether we are resolving type names to type definitions or to constructor methods. - - - - - A flag which indicates if it is an error to have two declared type parameters with identical names - in the name resolution environment. - - - - - Indicates whether an identifier (single or long) is followed by an extra dot. Typically used - to provide better tooling and error reporting. - - - - - Typars (always available by unqualified names). Further typars can be - in the tpenv, a structure folded through each top-level definition. - - - - - Other extension members unindexed by type - - - - - Extension members by type and name - - - - - Tycons available by unqualified, demangled names (i.e. (List,1) --> TyconRef) - - - - - Tycons available by unqualified, demangled names (i.e. (List,1) --> TyconRef) - - - - - Tycons indexed by the various names that may be used to access them, e.g. - "List" --> multiple TyconRef's for the various tycons accessible by this name. - "List`1" --> TyconRef - - - - - Record or unions that may have type instantiations associated with them - when record labels or union cases are used in an unqualified context. - - - - - 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 - - - - - Fully qualified modules and namespaces. 'open' does not change this. - - - - - 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. - - - - - Data Tags and Active Pattern Tags available by unqualified name - - - - - Enclosing type instantiations that are associated with an unqualified type item - - - - - Values and Data Tags available by unqualified name - - - - - Display environment information for output - - - - - The environment of information used to resolve names - - - - - ILExtMem(declaringTyconRef, ilMetadata, pri) - - IL-style extension member, backed by some kind of method with an [<Extension>] attribute - - - - - F#-style Extrinsic extension member, defined in F# code - - - - - Describes the sequence order of the introduction of an extension method. Extension methods that are introduced - later through 'open' get priority in overload resolution. - - - - - Information about an extension member held in the name resolution environment - - - - - Represents a record field resolution and the information if the usage is deprecated. - - - - - Pairs an Item with a TyparInstantiation showing how generic type variables of the item are instantiated at - a particular usage point. - - - - - Represents the potential resolution of an unqualified name to a type. - - - - - Represents the resolution of a name to a named property setter - - - - - Represents the resolution of a name to a named argument - - - - - Represents the resolution of a name to an operator - - - - - Represents the resolution of a name to a module or namespace - - - - - Represents the resolution of a name to a type variable - - - - - Represents the resolution of a name to a custom builder in the F# computation expression syntax - - - - - CustomOperation(nm, helpText, methInfo) - - Used to indicate the availability or resolution of a custom query operation such as 'sortBy' or 'where' in computation expression syntax - - - - - Represents the resolution of a name to a group of types - - - - - Represents the resolution of a name to a delegate - - - - - Represents the resolution of a name to the fake constructor simulated for an interface type. - - - - - Represents the resolution of a name to a constructor - - - - - Represents the resolution of a name to a group of methods. - - - - - Represents the resolution of a name to a property - - - - - Represents the resolution of a name to an event - - - - - Represents the resolution of a name to a .NET field - - - - - Represents the resolution of a name at the point of its own definition. - - - - - Represents the resolution of a name to a field of an anonymous record type. - - - - - Represents the resolution of a name to a union case field. - - - - - Represents the resolution of a name to an F# trait - - - - - Represents the resolution of a name to an F# record or exception field. - - - - - Represents the resolution of a name to an F# exception definition. - - - - - Represents the resolution of a name to an F# active pattern case within the body of an active pattern. - - - - - Represents the resolution of a name to an F# active pattern result. - - - - - Represents the resolution of a name to an F# union case. - - - - - Represents the resolution of a name to an F# value or function. - - - - - The text for the item to use in the declaration list. - This does not include backticks, parens etc. - - Note: here "Core" means "without added backticks or parens" - - - - - The full text for the item to show in error messages and to use in code. - This includes backticks, parens etc. - - - - - Represents an item that results from name resolution - - - - - The named argument is a static parameter to a provided type. - - - - - The named argument is an argument of a method - - - - - Represents the item with which a named argument is associated. - - - - - A NameResolver is a context for name resolution. It primarily holds an InfoReader. - - - - - Resolve a (possibly incomplete) long identifier to a set of possible resolutions, qualified by type. - - - - - Resolve a (possibly incomplete) long identifier to a set of possible resolutions. - - - - - Try to resolve a long identifier as type. - - - - - A generator of type instantiations used when no more specific type instantiation is known. - - - - - Resolve a long identifier occurring in an expression position, qualified by a type. - - - - - Resolve a long identifier occurring in an expression position. - - - - - Return the fields for the given class or record - - - - - Resolve a (possibly incomplete) long identifier to a loist of possible class or record fields - - - - - Resolve a long identifier occurring in an expression position - - - - - Resolve a long identifier to a nested field - - - - - Resolve a long identifier to a field - - - - - Resolve a long identifier to a type definition - - - - - Resolve a long identifier representing a type name - - - - - Resolve a long identifier when used in a pattern. - - - - - Resolve a long identifier using type-qualified name resolution. - - - - - Resolve a long identifier to an object constructor. - - - - - Resolve a long identifier to a namespace, module. - - - - - Generate a new reference to a record field with a fresh type instantiation - - - - - Get the available methods of a type (both declared and inherited) - - - - - Get all the available properties of a type (only extension) - - - - - Get all the available properties of a type (both intrinsic and extension) - - - - - Report an open declaration - - - - - Report a specific name resolution at a source range - - - - - Report a specific name resolution at a source range, replacing any previous resolutions - - - - - Report a specific method group name resolution at a source range - - - - - Report a specific name resolution at a source range - - - - - Report the active name resolution environment for a source range - - - - - Temporarily suspend reporting of name resolution and type checking results - - - - - Temporarily redirect reporting of name resolution and type checking results - - - - - Hash compatible with ItemsAreEffectivelyEqual - - - - - Check for equality, up to signature matching - - - - - Qualified lookup of type names in the environment - - - - - Add some declared type parameters to the name resolution environment - - - - - Add the content of a type to the name resolution environment - - - - - Add a list of modules or namespaces to the name resolution environment - - - - - Add a single modules or namespace to the name resolution environment - - - - - Add a list of module or namespace to the name resolution environment, including any sub-modules marked 'AutoOpen' - - - - - Add a module abbreviation to the name resolution environment - - - - - Add an F# exception definition to the name resolution environment - - - - - Add a list of type definitions to the name resolution environment - - - - - Add active pattern result tags to the environment. - - - - - Add a single F# value to the environment. - - - - - Add some extra items to the environment for Visual Studio, e.g. record members - - - - - Add extra items to the environment for Visual Studio, e.g. static members - - - - - Find a field in anonymous record type - - - - - Get the active pattern elements defined in a module, if any. Cache in the slot in the module type. - - - - - Used to report a warning condition for the use of upper-case identifiers in patterns - - - - - Used to report an error condition where name resolution failed due to an indeterminate type - - - - - Check the names add up between a signature and its implementation. We check this first. - - - - - Primary relations on types and signatures, with the exception of - constraint solving and method overload resolution. - - - - - A slot that *might* have ambiguity due to multiple inheritance; happens with default interface implementations. - - - - - Gets the method info. - - - - - Indicates a slot which does not have to be implemented, because an inherited implementation is available. - - - - - Indicates a slot which has a default interface implementation. - A combination of this flag and the lack of IsOptional means the slot may have been reabstracted. - - - - - The overall information about a method implementation in a class or object expression - - - - - Get the properties relevant to determining 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 - - - - - Get the methods relevant to determining 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 - - - - - "Type Completion" inference and a few other checks at the end of the inference scope - - - - - Get the slots of a type that can or must be implemented. - - - - - Check all implementations implement some dispatch slot. - - - - - Check all dispatch slots are implemented by some override. - - - - - Check if an override exactly matches the requirements for a dispatch slot. - - - - - Get the override information for an object expression method being used to implement dispatch slots - - - - - Format the signature of a MethInfo as a string as part of an error message - - - - - Format the signature of an override as a string as part of an error message - - - - - Primary logic related to method overrides. - - - - - Unnamed called out args: return these as part of the return tuple - - - - - Unnamed called optional args: pass defaults for these - - - - - Unassigned args - - - - - The method we're attempting to call - - - - - The formal instantiation of the method we're attempting to call - - - - - The types of the actual object arguments, if any - - - - - The instantiation of the method we're attempting to call - - - - - The generic instantiation of the method we're attempting to call - - - - - Return type after tupling of out args is taken into account - - - - - The return type after implicit deference of byref returns is taken into account - - - - - Args assigned to specify values for attribute fields and properties (these are not necessarily "property sets") - - - - - The property related to the method we're attempting to call, if any - - - - - Named setters - - - - - The argument analysis for each set of curried arguments - - - - - Represents the syntactic matching between a caller of a method and the called method. - - The constructor takes all the information about the caller and called side of a method, match up named arguments, property setters etc., - and returns a CalledMeth object for further analysis. - - - - - Named args - - - - - Any unnamed caller arguments assigned to a "param array" argument - - - - - The called "ParamArray" argument, if any - - - - - Any unnamed caller arguments not otherwise assigned - - - - - The called arguments corresponding to "unnamed" arguments - - - - - Indicates whether a type directed conversion (e.g. int32 to int64, or op_Implicit) - has been used in F# code - - - - - Represents the list of unnamed / named arguments at method call site - remark: The usage of list list is due to tupling and currying of arguments, - stemming from SynValInfo in the AST. - - - - - Represents the resolution of a caller argument as a named-setter argument - - - - - Represents the possibilities for a named-setter argument (a property, field, or a record field setter) - - - - - The argument on the caller side - - - - - The called argument in the method - - - - - The identifier for a named argument, if any - - - - - Represents a match between a caller argument and a called argument, arising from either - a named argument or an unnamed argument. - - - - - In the following, 'T 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 '?', making the caller argument explicit-optional - - - - - Generate the arguments passed for a set of (solved) traits in non-generic code - - - - - Generate a lambda expression for the given solved trait. - - - - - Generate a witness for the given (solved) constraint. Five possiblilities are taken - into account. - 1. The constraint is solved by a .NET-declared method or an F#-declared method - 2. The constraint is solved by an F# record field - 3. The constraint is solved by an F# anonymous record field - 4. The constraint is considered solved by a "built in" solution - 5. The constraint is solved by a closed expression given by a provided method from a type provider - - In each case an expression is returned where the method is applied to the given arguments, or the - field is dereferenced. - - None is returned in the cases where the trait has not been solved (e.g. is part of generic code) - or there is an unexpected mismatch of some kind. - - - - - Build the argument list for a method call. Adjust for param array, 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. - - - - - Implements the elaborated form of adhoc conversions from functions to delegates at member callsites - - - - - Build a call to the System.Object constructor taking no arguments, - - - - - 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. - - - - - Make a call to a method info. Used by the optimizer and code generator to build - calls to the type-directed solutions to member constraints. - - - - - Is this a 'base' call - - - - - F# supports some adhoc conversions to make expression fit known overall type - - - - - F# supports some adhoc conversions to make expression fit known overall type - - - - - Performs a set of constraint solver operations returning TypeDirectedConversionUsed and - combines their results. - - - - - Performs a set of constraint solver operations returning TypeDirectedConversionUsed and - combines their results. - - - - - Logic associated with resolving method calls. - - - - - Represents the typechecked, elaborated form of a pattern, prior to pattern-match compilation. - - - - - What should the decision tree contain for any incomplete match? - - - - - Compile a pattern into a decision tree and a set of targets. - - - - - Add a post-inference check to run at the end of inference - - - - - Get the post-inference checks to run near the end of inference, but before defaults are applied - - - - - Get the post-inference checks to run at the end of inference - - - - - A function that denotes captured tcVal, Used in constraint solver and elsewhere to get appropriate expressions for a ValRef. - - - - - Each branch of the expression must convert to the type indicated - - - - - Each branch of the expression must have the type indicated - - - - - Represents a point where no subsumption/widening is possible - - - - - Represents known information prior to checking an expression or pattern, e.g. it's expected type - - - - - Cases for overload resolution failure that exists in the implementation of the compiler. - - - - - Captures relevant information for a particular failed overload resolution. - - - - - The type equation comes from a sequence expression. - - - - - The type equation comes from a pattern match guard. - - - - - The type equation comes from a return type of a pattern match clause (not the first clause). - - - - - The type equation comes from an downcast where a upcast could be used. - - - - - The type equation comes from a runtime type test. - - - - - The type equation comes from a yield in a computation expression. - - - - - The type equation comes from a return in a computation expression. - - - - - The type equation comes from a list or array constructor - - - - - The type equation comes from the verification of a tuple in record fields. - - - - - The type equation comes from the verification of record fields. - - - - - The type equation comes from a type check of the result of an else branch. - - - - - The type equation comes from an omitted else branch. - - - - - The type equation comes from an IF expression. - - - - - No context was given. - - - - - Information about the context of a type equation. - - - - - For some code like "let f() = ([] = [])", a free choice is made for a type parameter - for an interior type variable. This chooses a solution for a type parameter subject - to its constraints and applies that solution by using a constraint. - - - - - Generate the lambda argument passed for a use of a generic construct that accepts trait witnesses - - - - - Generate the arguments passed when using a generic construct that accepts traits witnesses - - - - - Determine if a codegen witness for a trait will require witness args to be available, e.g. in generic code - - - - - Generate a witness expression if none is otherwise available, e.g. in legacy non-witness-passing code - - - - - Remove the global constraints related to generalized type variables - - - - - Re-assess the staticness of the type parameters - - - - - The entry point to resolve the overloading for an entire call - - - - - Given a method, which may be generic, make new inference type variables for - its generic parameters, and ensure that the constraints the new type variables are adjusted. - - Returns the inference type variables as a list of types. - - - - - Given a set of type parameters, make new inference type variables for - each and ensure that the constraints on the new type variables are adjusted. - - Returns the inference type variables as a list of types. - - - - - Given a set of type parameters, make new inference type variables for - each and ensure that the constraints on the new type variables are adjusted. - - Returns - 1. the new type parameters - 2. the instantiation mapping old type parameters to inference variables - 3. the inference type variables as a list of types. - - - - - Given a set of formal type parameters and their constraints, make new inference type variables for - each and ensure that the constraints on the new type variables are adjusted to refer to these. - - Returns - 1. the new type parameters - 2. the instantiation mapping old type parameters to inference variables - 3. the inference type variables as a list of types. - - - - - Create a list of inference type variables, one for each element in the input list - - - - - Create an inference type variable representing an error condition when checking a measure - - - - - Create an inference type variable representing an error condition when checking an expression - - - - - Create an inference type variable for the kind of a byref pointer - - - - - Create an inference type variable - - - - - Create a type variable representing the use of a "_" in F# code - - - - - Solves constraints using a mutable constraint-solver state - - - - - 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. - - - - - Find all unsolved inference variables after type inference for an entire file - - - - - Indicates that type references are emitted as integer indexes into a supplied table - - - - - Indicates that witness parameters are recorded - - - - - Convert quoted TAST data structures to structures ready for pickling - - - - - Perform the checks on the TAST for a file after type inference is complete. - - - - - The combinations of limits which apply. - - - - - The scope of this Limit, i.e. "to which scope can a Val safely escape?". - Some values are not allowed to escape their scope. - For example, a top-level function is allowed to return a byref type, but inner functions are not. - This `scope` field is the information that lets us track that. - (Recall that in general scopes are counted starting from 0 indicating the top-level scope, and - increasing by 1 essentially for every nested `let`-binding, method, or module.) - - Some specific values which are often used: - * the value 0 is used in NoLimit and other situations which don't limit where the Val can escape; - * the value 1 is a "top-level local scope", allowing us to express the restriction "this cannot appear - at the top level" (for example, `let x = &y` cannot appear at the top level). - - - - - A "limit" here is some combination of restrictions on a Val. - - - - - Construct a Limit which expresses "this Val must obey the first Limit and the second Limit simultaneously". - - - - - Indicates that no limit applies to some Val. It can appear at the top level or within a `let`-binding, - and the Val does not have any byref- or span-related restrictions. - - - - - It's unlikely you want to use this module except within - PostInferenceChecks. It's exposed to allow testing. - - - - - Implements a set of checks on the TAST for a file that can only be performed after type inference - is complete. - - - - - Perform the TailCall analysis on the optimized TAST for a file. - The TAST is traversed analogously to the PostInferenceChecks phase. - For functions that are annotated with the [<TailCall>] attribute, a warning is emmitted if they are called in a - non-tailrecursive manner in the recursive scope of the function. - The ModuleOrNamespaceContents aren't mutated in any way by performing this check. - - - - - A cache for ArgReprInfos which get created multiple times for the same values - Since they need to be later mutated with updates from signature files this should make sure - we're always dealing with the same instance and the updates don't get lost - - - - - The set of active conditional defines. The value is None when conditional erasure is disabled in tooling. - - - - - Used to resolve names - - - - - Used to read and cache information about types and members - - - - - Used to generate names - - - - - Does this .fs file have a .fsi file? - - - - - Is this a .fsi file? - - - - - Are we compiling the signature of a module from fslib? - - - - - Holds the current inference constraints - - - - - Holds a reference to the component being compiled. - This field is very rarely used (mainly when fixing up forward references to fslib. - - - - - Used to generate new syntactic argument names in post-parse syntactic processing - - - - - Environment needed to convert IL types to F# types in the importer. - - - - - Are we in a script? if so relax the reporting of discarded-expression warnings at the top level - - - - - Set to true if this file causes the creation of generated provided types. - - - - - Guard against depth of expression nesting, by moving to new stack when a maximum depth is reached - - - - - 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 - - - - - Represents the compilation environment for typechecking a single file in an assembly. - - - - - Represents the flags passsed to TcPat regarding the binding location - - - - - Represents the context flowed left-to-right through pattern checking - - - - - Translation of patterns is split 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. - - - - - Represents the results of the first phase of preparing simple values from a pattern - - - - - Holds the initial ValMemberInfo and other information before it is fully completed - - - - - Represents the ValReprInfo for a value, before the typars are fully inferred - - - - - Indicates whether constraints should be checked when checking syntactic types - - - - - 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 - - - - - Represents the current environment of type variables that have implicit scope - (i.e. are without explicit declaration). - - - - - Here Some tcref indicates we can access protected members in all super types - - - - - Context information for type checker - - - - - Mutable accumulator for the current module type - - - - - Internals under these should be accessible - - - - - This field is computed from other fields, but we amortize the cost of computing it. - - - - - 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. - - - - - Name resolution information - - - - - Represents the type environment at a particular scope. Includes the name - resolution environment, the ungeneralizable items from earlier in the scope - and other information about the scope. - - - - - Represents an item in the environment that may restrict the automatic generalization of later - declarations because it refers to type inference variables. As type inference progresses - these type inference variables may get solved. - - - - - Is the an implicit constructor or an explicit one? - - - - - A handle to the boolean ref cell to hold success of initialized 'this' for 'type X() as x = ...' constructs - - - - - A handle to the ref cell to hold results of 'this' for 'type X() as x = ...' and 'new() as x = ...' constructs - in case 'x' is used in the arguments to the 'inherits' call. - - - - - 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 expr1 in "let x = expr1 in { new ... }" - REVIEW: clean up this rather odd approach ... - - - - - Represents information about object constructors - - - - - Represents information about the initialization field used to check that object constructors - have completed before fields are accessed. - - - - - Represents a recursive binding after it has been both checked and generalized, but - before initialization recursion has been rewritten - - - - - Represents a recursive binding after it has been both checked and generalized and after - the special adjustments for 'as this' class initialization checks have been inserted into members. - - - - - Represents a recursive binding after it has been both checked and generalized - - - - - Represents the usage points of a recursive binding that need later adjustment once the - type of the member of value is fully inferred. - - - - - Represents a recursive binding after it has been checked but prior to generalization - - - - - Represents a recursive binding after it has been normalized but before it has been checked - - - - - Represents a recursive binding after it has been normalized but before it's info has been put together - - - - - Represents the results of the second phase of checking simple values - - - - - Represents the results of the first phase of preparing bindings - - - - - RecursiveBindingInfo - flows through initial steps of TcLetrec - - - - - 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. - - - - - NormalizedBindingRhs records the r.h.s. of a binding after some munging just before type checking. - - - - - The result of checking a value or member signature - - - - - Represents the initial information about a recursive binding - - - - - Indicates if a member binding is an object expression binding - - - - - Indicates whether the position being checked is precisely the r.h.s. of a "'T :> ***" constraint or a similar - places where IWSAM types do not generate a warning - - - - - A binding in an expression - - - - - A binding in an object expression - - - - - A binding in a class - - - - - Extensions to a type in a different assembly - - - - - Extensions to a type within the same assembly - - - - - A binding in a module, or a member - - - - - A flag to represent the sort of bindings are we processing. - - - - - Indicates if member declarations are allowed to be override members. - - - - - Indicates if member declarations are allowed to be abstract members. - - - - - Provides information about the context for a value or member definition. - - - - - Represents information about the module or type in which a member or value is declared. - - - - - The results of applying let-style generalization after type checking. - - - - - Indicates whether a syntactic type is allowed to include new type variables - not declared anywhere, e.g. `let f (x: 'T option) = x.Value` - - - - - The pattern syntax can also represent active pattern arguments. This routine - converts from the pattern syntax to the expression syntax. - - 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. - - - - - Check a long identifier 'Case' or 'Case argsR' that has been resolved to an active pattern case - - - - - Helper used to check both record expressions and record patterns - - - - - Allow the inference of structness from the known type, e.g. - let (x: struct (int * int)) = (3,4) - - - - - Constrain two types to be equal within this type checking context - - - - - Given the declaration of a function or member, complete the processing of its ValReprInfo - once type parameters have been fully inferred via generalization. - - - - - Given the declaration of a function or member, process it to produce the ValReprInfo - giving the names and attributes relevant to arguments and return, but before type - parameters have been fully inferred via generalization. - - - - - Check a specification of a value or member in a signature or an abstract member - - - - - Check a syntactic type (with error recovery) - - - - - Check a syntactic type or unit of measure - - - - - Check a syntactic type - - - - - Check a collection of type parameters declarations - - - - - Check a set of explicitly declared constraints on type parameters - - - - - Check the application of a provided type to static args - - - - - Check a 'nameof' expression - - - - - Check an inheritance expression or other 'new XYZ()' expression - - - - - Part of check a collection of recursive bindings that might include members - - - - - Check a collection of `let rec` bindings - - - - - Get the binding for the implicit safe initialziation check value if it is being used - - - - - Check an individual `let rec` binding - - - - - Check a set of let bindings in a class or module - - - - - Check a pattern being used as a pattern match - - - - - Try to check a syntactic statement and indicate if it's type is not unit without emitting a warning - - - - - Check a linear expression (e.g. a sequence of 'let') in a tail-recursive way - and convert it to a typed tree expression, using the bodyChecker to check the parts - that are not linear. - - - - - Check a syntactic expression and convert it to a typed tree expression - - - - - Check a syntactic statement and convert it to a typed tree expression. - - - - - Process a leaf construct where the actual type of that construct is already pre-known, - and the overall type can be eagerly propagated into the actual type, including pre-calculating - any type-directed conversion. - - - - - Check a syntactic expression and convert it to a typed tree expression. Possibly allow for subsumption flexibility - and insert a coercion if necessary. - - - - - Check a syntactic expression and convert it to a typed tree expression - - - - - Converts 'a..b' to a call to the '(..)' operator in FSharp.Core - Converts 'a..b..c' to a call to the '(.. ..)' operator in FSharp.Core - - - - - Check that 'args' have the correct number of elements for a tuple expression. - If not, use 'tcArgs' to type check the given elements to show - their correct types (if known) in the error message and raise the error - - - - - Check a syntactic expression and convert it to a typed tree expression - - - - - Check a constant value, e.g. a literal - - - - - Check a set of attributes which can only target specific elements - - - - - Check a set of attributes and allow failure because a later phase of type realization - may successfully check the attributes (if the attribute type or its arguments is in the - same recursive group) - - - - - Check a set of attributes - - - - - Check and publish a value specification (in a signature or 'abstract' member) to the - module/namespace type accumulator and return the resulting Val(s). Normally only one - 'Val' results but CLI events may produce both and add_Event and _remove_Event Val. - - - - - Mark a typar as no longer being an inference type variable - - - - - Publish a value definition to the module/namespace type accumulator. - - - - - Publish a type definition to the module/namespace type accumulator. - - - - - Publish a module definition to the module/namespace type accumulator. - - - - - Produce a post-generalization type scheme for a simple type where no type inference generalization - is appplied. - - - - - Return a new environment suitable for processing declarations in the interior of a module definition - given that the accumulator for the module type already exisits. - - - - - Return a new environment suitable for processing declarations in the interior of a module definition - including creating an accumulator for the module type. - - - - - Return a new environment suitable for processing declarations in the interior of a type definition - - - - - Make initial information for a member value - - - - - Make an initial implicit safe initialization value - - - - - Make simple values (which are not recursive nor members) - - - - - Make an initial 'base' value - - - - - Make an initial 'Val' and publish it to the environment and mutable module type accumulator. - - - - - Make the check for safe initialization of a member - - - - - Locate the environment within a particular namespace path, used to process a - 'namespace' declaration. - - - - - Build the full ValReprInfo one type inference is complete. - - - - - Get the "this" variable from the lambda for an instance member binding - - - - - Get the accumulated module/namespace type for the current module/namespace being processed. - - - - - Produce a fresh view of an object type, e.g. 'List<T>' becomes 'List<?>' for new - inference variables with the given rigidity. - - - - - Adjust a recursive binding after generalization - - - - - Process recursive bindings so that initialization is through laziness and is checked. - The bindings may be either plain 'let rec' bindings or mutually recursive nestings of modules and types. - The functions must iterate the actual bindings and process them to the overall result. - - - - - Invoke pattern match compilation - - - - - Get the expression resulting from turning an expression into an enumerable value, e.g. at 'for' loops - - - - - Compute the available access rights and module/entity compilation path for a paricular location in code - - - - - Compute the available access rights from a particular location in code - - - - - Check if the type annotations and inferred type information in a value give a - full and complete generic type for a value. If so, enable generic recursion. - - - - - After inference, view a ValSchem in a canonical way. - - - - - After inference, view a set of declared type parameters in a canonical way. - - - - - Check a super type is valid - - - - - Check the flags on a member definition for consistency - - - - - Check that a member can be included in an interface - - - - - Process a normalized recursive binding and prepare for progressive generalization - - - - - Set the type of a 'Val' after it has been fully inferred. - - - - - Add a list of values to the environment, producing a new environment. Report to the sink. - - - - - Add a value to the environment, producing a new environment - - - - - Add a value to the environment, producing a new environment. Report to the sink. - - - - - Add a list of explicitly declared type variables to the environment, producing a new environment - - - - - Merge together lists of type variables to generalize, keeping canonical order - - - - - Record the entire contents of a module or namespace type as not-generalizable, that is - if any type variables occur free in the module or namespace type (because type inference - is not yet complete), then they can't be generalized. - - - - - An empty environment of type variables with implicit scope - - - - - Take a syntactic binding and do the very first processing step to normalize it. - - - - - The allowed attribute targets for an F# top level 'do' expression - - - - - The allowed attribute targets for an F# module declaration - - - - - The allowed attribute targets for an F# exception declaration - - - - - The allowed attribute targets for an F# type declaration - - - - - The allowed attribute targets for an F# union case declaration - - - - - The allowed attribute targets for an F# field declaration once it's known to be targeting - a field not a property (see useGenuineField) - - - - - The allowed attribute targets for an F# field declaration - - - - - Given an environment, compute the set of type definitions which must appear before - the current location, not after (to prevent use-before-definition of type definitions - via type inference). - - - - - Given an environment, compute the set of trait solutions which must appear before - the current location, not after (to prevent use-before definitiosn and - forward calls via type inference filling in trait solutions). - - - - - Given an environment, compute the set of inference type variables which may not be - generalised, because they appear somewhere in the types of the constructs availabe - in the environment. - - - - - Check a set of simple patterns, e.g. the declarations of parameters for an implicit constructor. - - - - - Represents a single group of bindings in a class with an implicit constructor - - - - - vals represented as fields or members from this point on - - - - - vals mapped to representations - - - - - Indicates the set of field names taken within one incremental class - - - - - Given localRep saying how locals have been represented, e.g. as fields. - Given an expr under a given thisVal context. - - - - - IncrClassReprInfo represents the decisions we make about the representation of 'let' and 'do' bindings in a - type defined with implicit class construction. - - - - - Indicates how is a 'let' bound value in a class with implicit construction is represented in - the TAST ultimately produced by type checking. - - - - - The value representing the 'this' variable within the implicit instance constructor. - - - - - The value representing the 'base' variable within the implicit instance constructor. - - - - - Data indicating if safe-initialization checks need to be inserted for this type. - - - - - The reference cell holding the 'this' parameter within the implicit constructor so it can be referenced in the - arguments passed to the base constructor - - - - - The values representing the arguments to the implicit constructor. - - - - - The type of the implicit constructor, representing as a ValScheme. - - - - - The value representing the implicit constructor. - - - - - Typechecked info for implicit instance constructor and it's arguments - - - - - The name generator used to generate the names of fields etc. within the type. - - - - - The value representing the static implicit constructor. - Lazy to ensure the static ctor value is only published if needed. - - - - - The copy of the type parameters allocated for implicit construction - - - - - The TyconRef for the type being defined - - - - - Typechecked info for implicit static constructor - - - - - Given a set of 'let' bindings (static or not, recursive or not) that make up a class, - generate their initialization expression(s). - - - - The information about the static implicit constructor - The lhs information about the implicit constructor, the call to the super class constructor and whether we should we place a sequence point at the 'inheritedTys call? - The declarations - - Record any unconstrained type parameters generalized for the outer members as "free choices" in the let bindings - - - - - Check and elaborate the "left hand side" of the implicit class construction - syntax. - - - - - Check and elaborate the "left hand side" of the implicit class construction - syntax. - - - - - Optimization information - - - - - For unit testing - - - - - The size after which we don't inline - - - - - size after which we start enforcing splitting sub-expressions to new methods, to avoid hitting .NET IL limitations - - - - - size after which we start chopping methods in two, though only at match targets - - - - - Use multiple threads. - As soon as a given phase for a file has finished, start processing the next phase of the current file and the same phase of the next file. - - - - - Process files sequentially, on a single thread, doing all optimization phases for each file next to each other. - - - - - Indicates the value is only mutable during its initialization and before any access or capture - - - - - Check if an expression has an effect - - - - - Combine optimization infos - - - - - Ensure that 'internal' items are not exported in the optimization info - - - - - Rewrite the module info using the export remapping - - - - - Saving and re-reading optimization information - - - - - Displaying optimization data - - - - - Optimize one implementation file in the given environment - - - - - For building optimization environments incrementally - - - - - top of expr toplevel? (true) - - - - - val not defined under lambdas - - - - - v -> recursive? * v list -- the others in the mutual binding - - - - - bound in a decision tree? - - - - - v -> binding repr - - - - - v -> context / APP inst args - - - - - Expands under-applied values of known arity to lambda expressions, and then reduce to bind - any known arguments. The results are later optimized by Optimizer.fs - - - - - 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. - - - - - Detect a 'seq<int>' type - - - - - The construct was not a state machine - - - - - A state machine was recognised and was not compilable and no alternative is available - - - - - A state machine was recognised and was not compilable and an alternative is available - - - - - A state machine was recognised and was compilable - - - - - Analyze a TAST expression to detect the elaborated form of a state machine expression, a special kind - of object expression that uses special code generation constructs. - - - - - Rewrite mutable locals to reference cells across an entire implementation file - - - - - The ILX generator. - - - - - 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 initially - points to stderr. All functions call flush() automatically. - - REVIEW: review if we should just switch to System.Diagnostics - - - - - A utility type provided for completeness - - - - - A utility type provided for completeness - - - - - Decompose a type definition according to its kind. - - - - - Helpers for codegen: scopes for allocating new temporary variables. - - - - - Is the given assembly possibly a primary assembly? - In practice, a primary assembly is an assembly that contains the System.Object type definition - and has no referenced assemblies. - However, we must consider assemblies that forward the System.Object type definition - to be possible primary assemblies. - Therefore, this will return true if the given assembly is the real primary assembly or an assembly that forwards - the System.Object type definition. - Assembly equivalency ignores the version here. - - - - - A table of common references to items in primary assembly (System.Runtime or mscorlib). - If a particular version of System.Runtime.dll has been loaded then you should - reference items from it via an ILGlobals for that specific version built using mkILGlobals. - - - - - e.g. win86 resources, as the exact contents of a .res or .obj file. Must be unlinked manually. - - - - - 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. - - - - - Represents a native resource to be written in an output file - - - - - Represents a native resource to be read from the PE file - - - - - Records whether the entrypoint resides in another module. - - - - - Records the types implemented by this assembly in auxiliary - modules. - - - - - 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. - - - - - This is the ID of the algorithm used for the hashes of auxiliary - files in the assembly. These hashes are stored in the - <c>ILModuleRef.Hash</c> fields of this assembly. These are not - cryptographic hashes: they are simple file hashes. The algorithm - is normally <c>0x00008004</c> indicating the SHA1 hash algorithm. - - - - - The main module of an assembly is a module plus some manifest information. - - - - - Table of resources in a module. - - - - - Read the bytes from a resource local to an assembly. Will fail for non-local resources. - - - - - "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. - - - - - Represents a manifest resource in a different assembly - - - - - Represents a manifest resource in an associated file - - - - - Represents a manifest resource that can be read or written to a PE file - - - - - [Namespace.]Name - - - - - these are only found in the ILExportedTypesAndForwarders table in the manifest - - - - - "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 "ILExportedTypeOrForwarder" - definition. - these are only found in the "Nested" field of ILExportedTypeOrForwarder objects - - - - - Realise the actual full typedef - - - - - Represents a prefix of information for ILTypeDef. - - The information is enough to perform name resolution for the F# compiler, probe attributes - for ExtensionAttribute etc. This is key to the on-demand exploration of .NET metadata. - This information has to be "Goldilocks" - not too much, not too little, just right. - - - - - Class or interface generated for COM interop. - - - - - Some classes are marked "HasSecurity" even if there are no permissions attached, - e.g. if they use SuppressUnmanagedCodeSecurityAttribute - - - - - Functional update - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value, using delayed reading via a metadata index, for ilread.fs - - - - - Represents IL Type Definitions. - - - - - Calls to <c>FindByName</c> will result in all the ILPreTypeDefs being read. - - - - - Calls to <c>ExistsByName</c> will result in all the ILPreTypeDefs being read. - - - - - Get some information about the type defs, but do not force the read of the type defs themselves. - - - - - Tables of named type definitions. - - - - - A categorization of type definitions into "kinds" - - - - - Type Access. - - - - - Default Unicode encoding for P/Invoke within a type. - - - - - Indicate the initialization semantics of a type. - - - - - Type Layout information. - - - - - Method Impls - - - - - Table of properties in an IL type definition. - - - - - Functional update of the value - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value, using delayed reading via a metadata index, for ilread.fs - - - - - Property definitions - - - - - Table of those events in a type definition. - - - - - Functional update of the value - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value, using delayed reading via a metadata index, for ilread.fs - - - - - Event definitions. - - - - - Tables of fields. Logically equivalent to a list of fields but the table is kept in - a form to allow efficient looking up fields by name. - - - - - The explicit offset in bytes when explicit layout is used. - - - - - Functional update of the value - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value using delayed reading via a metadata index - - - - - Field definitions. - - - - - 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. - - - - - Indicates an instance methods that is virtual or abstract or implements an interface slot. - - - - - The method is exported to unmanaged code using COM interop. - - - - - Indicates a static method. - - - - - Indicates this is an instance methods that is not virtual. - - - - - SafeHandle finalizer must be run. - - - - - Indicates a .ctor method. - - - - - Indicates a .cctor method. - - - - - Some methods are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute - - - - - Functional update of the value - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value, with delayed reading of some elements via a metadata index - - - - - IL Method definitions. - - - - - Do not use this - - - - - Do not use this - - - - - Indicates the type argument must have a public nullary constructor. - - - - - Indicates the type argument must be a value type, but not Nullable. - - - - - Indicates the type argument must be a reference type. - - - - - Variance of type parameters, only applicable to generic parameters for generic interfaces and delegates. - - - - - At most one is the parent type, the others are interface types. - - - - - Generic parameters. Formal generic parameter declarations may include the bounds, if any, on the generic parameter. - - - - - Represents a reference to a method declaration in a superclass or interface. - - - - - PInvoke attributes. - - - - - Represents the efficiency-oriented storage of ILSecurityDecls in another item. - - - - - Abstract type equivalent to ILSecurityDecl list - use helpers - below to construct/destruct these. - - - - - Method return values. - - - - - Marshalling map for parameters. COM Interop only. - - - - - Method parameters and return values. - - - - - Represents the efficiency-oriented storage of ILAttributes in another item. - - - - - Attribute with args in decoded form. - - - - - Attribute with args encoded to a binary blob according to ECMA-335 II.21 and II.23.3. - 'decodeILAttribData' is used to parse the byte[] blob to ILAttribElem's as best as possible. - - - - - Attribute instance constructor. - - - - - Decoded arguments. May be empty in encoded attribute form. - - - - - Custom attribute. - - - - - Named args: values and flags indicating if they are fields or properties. - - - - - 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. - - - - - Family - Indicates that the method is accessible only to members of this class and its derived classes. (protected) - - - - - FamilyOrAssembly - Indicates that the method is accessible to derived classes anywhere, as well as to any class _in the assembly_. (protected internal) - - - - - FamilyAndAssembly - Indicates that the method is accessible to members of this type and its derived types that are in _this assembly only_. (private protected) - - - - - Assembly - Indicates that the method is accessible to any class of this assembly. (internal) - - - - - Member Access - - - - - IL method bodies - - - - - Defines a set of opened namespace, type relevant to a code location. - - Emitted to the PortablePDB format. - - - - - Represents an 'open XYZ' opening a namespace - - - - - Represents an 'open type XYZ' opening a type - - - - - Defines an opened namespace, type relevant to a code location. - - Emitted to the PortablePDB format. Note the format supports additional variations on - imported things that are not yet emitted in F#. - - - - - Local variables - - - - - optional idx of parameter giving size plus optional additive i.e. num elems - - - - - Native Types, for marshalling to the native C interface. - These are taken directly from the ILASM syntax. - Most of these are listed in the CLI ECMA-335 Spec (Partition II, 7.4). - - - - - Field Init - - - - - Indicates that a particular local variable has a particular source - language name within a given set of ranges. This does not effect local - variable numbering, which is global over the whole method. - - - - - The instruction set. - - - - - ILCode labels. In structured code each code label refers to a basic block somewhere in the code of the method. - - - - - Field specs. The data given for a ldfld, stfld etc. instruction. - - - - - Functional creation - - - - - The information at the callsite of a method - - - - - Formal identities of fields. - - - - - Functional creation - - - - - Formal identities of methods. - - - - - Actual generic parameters are always types. - - - - - The type being modified. - - - - - The class of the custom modifier. - - - - - True if modifier is "required". - - - - - Custom modifiers. - - - - - Reference a generic arg. - - - - - ILCode pointers. - - - - - Managed pointers. - - - - - Unmanaged pointers. Nb. the type is used by tools and for binding only, not by the verifier. - - - - - Reference types. Also may be used for parents of members even if for members in value types. - - - - - Unboxed types, including builtin types. - - - - - Array types - - - - - Used only in return and pointer types. - - - - - Which type is being referred to? - - - - - Where is the type, i.e. is it in this module, in another module in this assembly or in another assembly? - - - - - The name of the type. This also contains the namespace if Enclosing is empty. - - - - - The type instantiation if the type is generic, otherwise empty - - - - - The name of the type in the assembly using the '.' notation for nested types. - - - - - The list of enclosing type names for a nested type. If non-nil then the first of these also contains the namespace. - - - - - Create an ILTypeSpec. - - - - - Type specs and types. - - - - - Where is the type, i.e. is it in this module, in another module in this assembly or in another assembly? - - - - - The name of the type. This also contains the namespace if Enclosing is empty. - - - - - The name of the type in the assembly using the '.' notation for nested types. - - - - - The list of enclosing type names for a nested type. If non-nil then the first of these also contains the namespace. - - - - - The name of the type in the assembly using the '+' notation for nested types. - - - - - Create a ILTypeRef. - - - - - Type refs, i.e. references to types in some .NET assembly - - - - - Bounds for a single dimensional, zero based array - - - - - Lower-bound/size pairs - - - - - Array shapes. For most purposes the rank is the only thing that matters. - - - - - no 'this' pointer is passed - - - - - accepts an explicit 'this' pointer - - - - - accepts an implicit 'this' pointer - - - - - A reference to a type in the primary assembly - - - - - A reference to a type in another assembly - - - - - A reference to a type in a module in the same assembly - - - - - A reference to the type in the current module - - - - - CLI says this indicates if the assembly can be retargeted (at runtime) to be from a different publisher. - - - - - The fully qualified name of the assembly reference, e.g. mscorlib, Version=1.0.3705 etc. - - - - - Debug info. Values of type "source" can be attached at sequence - points and some other locations. - - - - - Represents guids - - - - - Checks if an assembly resolution may represent a primary assembly that actually contains the - definition of Sytem.Object. Note that the chosen target primary assembly may not actually be the one - that contains the definition of System.Object - it is just the one we are choosing to emit for. - - - - - Represents the target primary assembly - - - - - Find the full set of assemblies referenced by a module. - - - - - Get a version number from a CLR version string, e.g. 1.0.3705.0 - - - - - Get a public key token from a public key. - - - - - Discriminating different important built-in types. - - - - - Strips ILType.Modified from the ILType. - - - - - This is a 'vendor neutral' way of referencing mscorlib. - - - - - Instantiate type variables that occur within types and other items. - - - - - Instantiate type variables that occur within types and other items. - - - - - Unscoping. Clears every scope information, use for looking up IL method references only. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - 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 ILScopeRef.Local, unless we've generated the ILTypeDef in - an auxiliary module or are generating multiple assemblies at - once. - - - - - Making modules. - - - - - Create table of types which is loaded/computed on-demand, and whose individual - elements are also loaded/computed on-demand. Any call to tdefs.AsList 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. - - - - - Making tables of custom attributes, etc. - - - - - The toplevel "class" for a module or assembly. - - - - - Given a delegate type definition which lies in a particular scope, - make a reference to its constructor. - - - - - Derived functions for making some simple constructors - - - - - 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. - - - - - 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. - - - - - 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 '<PrivateImplementationDetails>'/'$$struct0x6000127-1' '<PrivateImplementationDetails>'::'$$method0x6000127-1' - call void System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class System.Array,valuetype System.RuntimeFieldHandle) - idiom. - - - - - Make a type definition. - - - - - Make field definitions. - - - - - Make method definitions. - - - - - Make a formal generic parameters. - - - - - Derived functions for making return, parameter and local variable - objects for use in method definitions. - - - - - Derived functions for making some common patterns of instructions. - - - - - 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. - - - - - Making code. - - - - - Make custom attributes. - - - - - Make generalized versions of possibly-generic types, e.g. Given the ILTypeDef for List, return the type "List<T>". - - - - - Construct references to fields. - - - - - Construct references to constructors. - - - - - Construct references to static, non-generic methods. - - - - - Construct references to static methods. - - - - - Construct references to instance methods. - - - - - Construct references to instance methods. - - - - - Construct references to methods on a given type . - - - - - Make method references and specs. - - - - - Make types. - - - - - Make type specs. - - - - - Make type refs. - - - - - Generate simple references to assemblies and modules. - - - - - 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. - - - - - When writing a binary the fake "toplevel" type definition (called <Module>) - must come first. This function puts it first, and creates it in the returned - list as an empty typedef if it doesn't already exist. - - - - - Build the table of commonly used references given functions to find types in system assemblies - - primaryScopeRef is the primary assembly we are emitting - equivPrimaryAssemblyRefs are ones regarded as equivalent - - - - splitTypeNameRight is like splitILTypeName except the - namespace is kept as a whole string, rather than split at dots. - - - - The <c>splitILTypeName</c> 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. - - - - - 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. - - - - - The "unlinked" view of .NET metadata and code. Central to the Abstract IL library - - - - - Various constants and utilities used when parsing the ILASM format for IL - - - - - This function gets the name of a token as a string - - - - - This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production - - - - - This function maps integer indexes to symbolic token ids - - - - - This function maps tokens to integer indexes - - - - - Rule token - - - - - Printer for the abstract syntax. - - - - - Morph all type references throughout an entire module. - - - - - Morph each ILTypeRef inside an ILType - - - - - Morph each scope reference inside a type signature. - - - - - 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. - - - - - Functions associated with signing il assemblies which - vary between supported implementations of the CLI Common Language - Runtime, e.g. between the SSCLI, Mono and the Microsoft CLR. - - - - - - 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. - - - - - 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-*.fs - - - - - Compiler use only. Code and constants shared between binary reader/writer. - - - - - Represents a reader of the metadata of a .NET binary. May also give some values (e.g. IL code) from the PE file - if it was provided. - - - - - A function to call to try to get an object that acts as a snapshot of the metadata section of a .NET binary, - and from which we can read the metadata. Only used when metadataOnly=true. - - - - - Only open a metadata reader for the metadata portion of the .NET binary without keeping alive any data associated with the PE reader - - IL code will not be available (mdBody in ILMethodDef will return NotAvailable) - - Managed resources will be reported back as ILResourceLocation.LocalIn (as always) - - Native resources will not be available (none will be returned) - - Static data associated with fields will not be available - - - - - Used to implement a Binary file over native memory, used by Roslyn integration - - - - - Open a binary reader based on the given stream. - This binary reader is not internally cached. - The binary reader will own the given stream and the stream will be disposed when there are no references to the binary reader. - - - - - Open a binary reader based on the given bytes. - This binary reader is not internally cached. - - - - - 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. - Binary reader is internally cached. - - - - - The public API hook for changing the IL assembly reader, used by Resharper - - - - - Binary reader. Read a .NET binary and concert it to Abstract IL data - structures. - - NOTE: - - The metadata in the loaded modules will be relative to - those modules, e.g. ILScopeRef.Local will mean "local to - that module". You must use [rescopeILType] 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. - - - - - MVID of the generated .NET module (used by MDB files to identify debug info) - - - - - Represents an 'open XYZ' opening a namespace - - - - - Represents an 'open type XYZ' opening a type - - - - - Defines the set of 'imports' - that is, opened namespaces, types etc. - at each code location - - Note the C# debug evaluation engine used for F# will give C# semantics to these. That in general - is very close to F# semantics, except for things like union type. - - - - - the local index the name corresponds to - - - - - Check to see if a scope has a local with the same name as any of its children - - If so, do not emit 'scope' itself. Instead, - 1. Emit a copy of 'scope' in each true gap, with all locals - 2. Adjust each child scope to also contain the locals from 'scope', - adding the text " (shadowed)" to the names of those with name conflicts. - - - - - 28 is the size of the IMAGE_DEBUG_DIRECTORY in ntimage.h - - - - - Takes the output file name and returns debug file name. - - - - - The ILPdbWriter - - - - - Write a binary to an array of bytes auitable for dynamic loading. - - - - - Write a binary to the file system. - - - - - The IL Binary writer. - - - - - Write Abstract IL structures at runtime using Reflection.Emit - - - - - Debug info for generated code for classunions - - - - - Debug info for generated code for classunions. - - - - - Generate the helpers? - - - - - Are the representation helpers public? - - - - - Is the representation public? - - - - - Represents a discriminated union type prior to erasure - - - - - Represents a closure prior to erasure - - - - - IlxClosureApps - i.e. types being applied at a callsite. - - - - - Indicates if a static field being used to store an instance of this closure (because it has no free variables) - - - - - Get the constructor for the closure - - - - - Get the static field used to store an instance of this closure, if useStaticField is true - - - - - Represents a usage of a closure - - - - - Union references - - - - - Union alternative - - - - - The name used for the field in parameter or IL field position. - - - - - Union case field - - - - - ILX extensions to Abstract IL types and instructions F# - - - - - Compiler use only. Erase closures - - - - - Used to emit instructions (an interface to the IlxGen.fs code generator) - - - - - Emit the instruction sequence for a "switchdata" operation - - - - - Emit the instruction sequence for a "lddatatag" operation - - - - - Emit the instruction sequence for a "castdata" operation - - - - - Make the IL type for a union type alternative - - - - - Make the type definition for a union type - - - - - Make the instruction sequence for a "brisnotdata" operation - - - - - Make the instruction for a "stdata" operation - - - - - Make the instruction for a "lddataa" operation - - - - - Make the instruction for a "lddata" operation - - - - - Make the instruction sequence for a "isdata" operation - - - - - Make the instruction sequence for a "newdata" operation - - - - - Invert the compilation of the given value and return its current dynamic value and its compiled System.Type - - - - - Generate ILX code for an assembly fragment - - - - - Invert the compilation of the given value and set the storage of the value, even if it is immutable - - - - - Invert the compilation of the given value and clear the storage of the value - - - - - Register a fragment of the current assembly with the ILX code generator. If 'isIncrementalFragment' is true then the input - is assumed to be a fragment 'typed' into FSI.EXE, otherwise the input is assumed to be the result of a '#load' - - - - - Register a set of referenced assemblies with the ILX code generator - - - - - Create an incremental ILX code generator for a single assembly - - - - - An incremental ILX code generator for a single assembly - - - - - Used to support the compilation-inversion operations "ClearGeneratedValue" and "LookupGeneratedValue" - - - - - The generated IL/ILX resources associated with F# quotations - - - - - The security attributes to attach to the assembly - - - - - The attributes for the assembly in F# form - - - - - The generated IL/ILX .NET module attributes - - - - - The generated IL/ILX assembly attributes - - - - - The generated IL/ILX type definitions - - - - - The results of the ILX compilation of one fragment of an assembly - - - - - When set to true, the IlxGen will delay generation of method bodies and generate them later in parallel (parallelized across files) - - - - - Indicates that, whenever possible, use callvirt instead of call - - - - - Suppress ToString emit - - - - - Indicates the code generated is an interactive 'it' expression. We generate a setter to allow clearing of the underlying - storage, even though 'it' is not logically mutable - - - - - Indicates the code is being generated in FSI.EXE and is executed immediately after code generation - This includes all interactively compiled code, including #load, definitions, and expressions - - - - - Is --multiemit enabled? - - - - - Indicates which backend we are generating code for - - - - - A flag to help test emit of debug information - - - - - Indicates if we are generating debug symbols or not - - - - - Indicates if local optimizations are active - - - - - If this is set, then the last module becomes the "main" module - - - - - Indicates if static array data should be emitted using static blobs - - - - - Indicates if we should workaround old reflection emit bugs - - - - - Indicates if we are generating filter blocks - - - - - Indicates how the generated IL code is ultimately emitted - - - - - Determine if an F#-declared value, method or function is compiled as a method. - - - - - Construct a new DependencyProvider - - - - - Construct a new DependencyProvider - - - - - Handle Assembly resolution - - - - - Signature for ResolutionProbe callback - host implements this, it's job is to return a list of assembly paths to probe. - - - - - Construct a new NativeDllResolveHandler - - - - - Construct a new NativeDllResolveHandler - - - - - Signature for Native library resolution probe callback - host implements this, it's job is to return a list of package roots to probe. - - - - - TryFindDependencyManagerInPath - given a #r "key:sometext" go and find a DependencyManager that satisfies the key - - - - - Fetch a dependencymanager that supports a specific key - - - - - Resolve reference for a list of package manager lines - - - - - Returns a formatted help messages for registered dependencymanagers for the host to present - - - - - Returns a formatted error message for the host to present - - - - - Clear the DependencyManager results caches - - - - - Construct a new DependencyProvider with managed and native resolution and specify caching - - - - - Construct a new DependencyProvider with managed and native resolution - - - - - Construct a new DependencyProvider with only native resolution and specify caching - - - - - Construct a new DependencyProvider with only native resolution - - - - - Construct a new DependencyProvider with no dynamic load handlers (only for compilation/analysis) - - - - - Provides DependencyManagement functions. - - The class incrementally collects IDependencyManagerProvider, indexed by key, and - queries them. These are found and instantiated with respect to the compilerTools and outputDir - provided each time the TryFindDependencyManagerByKey and TryFindDependencyManagerInPath are - executed, which are assumed to be invariant over the lifetime of the DependencyProvider. - - - - - Todo describe this API - - - - - Name of the dependency manager - - - - - Key that identifies the types of dependencies that this DependencyManager operates on - E.g - nuget: indicates that this DM is for nuget packages - paket: indicates that this DM is for paket scripts, which manage nuget packages, github source dependencies etc ... - - - - - The help messages for this dependency manager inster - - - - - Resolve the dependencies, for the given set of arguments, go find the .dll references, scripts and additional include values. - - - - - Clear the results cache - - - - - Wraps access to a DependencyManager implementation - - - - - Succeded? - - - - - The resolution output log - - - - - The resolution error log (process stderr) - - - - - The source code file paths - - - - - The roots to package directories - This points to the root of each located package. - The layout of the package manager will be package manager specific. - however, the dependency manager dll understands the nuget package layout - and so if the package contains folders similar to the nuget layout then - the dependency manager will be able to probe and resolve any native dependencies - required by the nuget package. - - This path is also equivalent to - #I @"c:\somepath\to\packages\1.1.1\ResolvedPackage" - - - - - The resolution paths - the full paths to selected resolved dll's. - In scripts this is equivalent to #r @"c:\somepath\to\packages\ResolvedPackage\1.1.1\lib\netstandard2.0\ResolvedAssembly.dll" - - - - - The results of ResolveDependencies - - - - - Get a TcConfigProvider which will return only the exact TcConfig. - - - - - Get a TcConfigProvider which will continue to respect changes in the underlying - TcConfigBuilder rather than delivering snapshots. - - - - - Represents a computation to return a TcConfig. Normally this is just a constant immutable TcConfig, - but for F# Interactive it may be based on an underlying mutable TcConfigBuilder. - - - - - Prevent erasure of conditional attributes and methods so tooling is able analyse them. - - - - - If true, indicates all type checking and code generation is in the context of fsi.exe - - - - - if true - 'let mutable x = Span.Empty', the value 'x' is a stack referring span. Used for internal testing purposes only until we get true stack spans. - - - - - Set if the user has explicitly turned indentation-aware syntax on/off - - - - - Indicates if F# Interactive is using single-assembly emit via Reflection.Emit, where internals are available. - - - - - Check if the primary assembly is mscorlib - - - - - Take '#line' into account? Defaults to true - - - - - Indicates if the compilation will result in F# signature data resource in the generated binary - - - - - Indicates if the compilation will result in an F# optimization data resource in the generated binary - - - - - File system query based on TcConfig settings - - - - - File system query based on TcConfig settings - - - - - Get the loaded sources that exist and issue a warning for the ones that don't - - - - - Allow forking and subsuequent modification of the TcConfig via a new TcConfigBuilder - - - - - Immutable TcConfig, modifications are made via a TcConfigBuilder - - - - - Take '#line' into account? Defaults to true - - - - - Prevent erasure of conditional attributes and methods so tooling is able analyse them. - - - - - if true - 'let mutable x = Span.Empty', the value 'x' is a stack referring span. Used for internal testing purposes only until we get true stack spans. - - - - - A function to call to try to get an object that acts as a snapshot of the metadata section of a .NET binary, - and from which we can read the metadata. Only used when metadataOnly=true. - - - - - If true, indicates all type checking and code generation is in the context of fsi.exe - - - - - Sources added into the build with #load - - - - - Set if the user has explicitly turned indentation-aware syntax on/off - - - - - When using TypeCheckingMode.Graph, this flag determines whether the - resolved file graph should be serialised as a Mermaid diagram into a file next to the output dll. - - - - - Some of the information dedicated to type-checking. - - - - - Parallel type-checking that uses automated file-to-file dependency detection to construct a file graph processed in parallel. - - - - - Default mode where all source files are processed sequentially in compilation order. - - - - - Determines the algorithm used for type-checking. - - - - - Includes F# signature and optimization metadata as resources in the emitting assembly. - Only emits the assembly as a reference assembly. - - - - - Includes F# signature and optimization metadata as resources in the emitting assembly. - Implementation assembly will still be emitted normally, but will emit the reference assembly with the specified output path. - - - - - Represents the file or string used for the --version flag - - - - - The name of the assembly file generated by the project - - - - - Get the logical timestamp that would be the timestamp of the assembly file generated by the project. - - For project references this is maximum of the timestamps of all dependent files. - The project is not actually built, nor are any assemblies read, but the timestamps for each dependent file - are read via the FileSystem. If the files don't exist, then a default timestamp is used. - - The operation returns None only if it is not possible to create an IncrementalBuilder for the project at all, e.g. if there - are fatal errors in the options for the project. - - - - - Evaluate raw contents of the assembly file generated by the project. - 'None' may be returned if an in-memory view of the contents is, for some reason, - not available. In this case the on-disk view of the contents will be preferred. - - - - - Get the short name for this assembly - - - - - Get the identity of the assembly - - - - - Get the identities of the assemblies referenced by this assembly - - - - - Indicates if the assembly has an F# signature data attribute auitable for use with this version of F# tooling - - - - - Indicates if the assembly has any F# signature data attribute - - - - - The raw IL module definition in the assembly, if any. This is not present for cross-project references - in the language service - - - - - Get the table of type forwarders in the assembly - - - - - Get the raw F# signature data in the assembly, if any - - - - - Get the raw F# optimization data in the assembly, if any - - - - - The raw list InternalsVisibleToAttribute attributes in the assembly - - - - - The raw list AutoOpenAttribute attributes in the assembly - - - - - Represents a reference to an F# assembly. May be backed by a real assembly on disk (read by Abstract IL), or a cross-project - reference in FSharp.Compiler.Service. - - - - - Indicates whether experimental features should be enabled automatically - - - - - File suffixes where #light is the default - - - - - Script file suffixes - - - - - Implementation file suffixes - - - - - Signature file suffixes - - - - - Get the name used for FSharp.Core - - - - - The configuration of the compiler (TcConfig and TcConfigBuilder) - - - - - Try to resolve a referenced assembly based on TcConfig settings. - - - - - Try to find a provider-generated assembly - - - - - Try to find the given assembly reference by simple name. Used in magic assembly resolution. Effectively does implicit - unification of assemblies by simple assembly name. - - - - - Try to find the given assembly reference. - - - - - Resolve a referenced assembly and report an error if the resolution fails. - - - - - Report unresolved references that also weren't consumed by any type providers. - - - - - This excludes any framework imports (which may be shared between multiple builds) - - - - - Represents a table of imported assemblies with their resolutions. - Is a disposable object, but it is recommended not to explicitly call Dispose unless you absolutely know nothing will be using its contents after the disposal. - Otherwise, simply allow the GC to collect this and it will properly call Dispose from the finalizer. - - - - - Tables of assembly resolutions - - - - - Represents a resolved imported assembly - - - - - Represents a resolved imported binary - - - - - Lazily populated ilAssemblyRef for this reference. - - - - - Whether or not this is an installed system assembly (for example, System.dll) - - - - - Create the tooltip text for the assembly reference - - - - - Path to the resolvedFile - - - - - The original reference to the assembly. - - - - - Process a group of #r in F# Interactive. - Adds the reference to the tcImports and add the ccu to the type checking environment. - - - - - Encode the F# interface data into a set of IL attributes and resources - - - - - Determine if an IL resource attached to an F# assembly is an F# quotation data resource for reflected definitions - - - - - Determine if an IL resource attached to an F# assembly is an F# optimization data resource - - - - - Determine if an IL resource attached to an F# assembly is an F# signature data resource - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - Contains logic to coordinate assembly resolution and manage the TcImports table of referenced - assemblies. - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Remove 'implicitIncludeDir' from a file name before output - - - - - Get a diagnostics logger that filters the reporting of warnings based on scoped pragma information - - - - - Write extra context information for a diagnostic - - - - - Output all of a diagnostic to a buffer, including range - - - - - Indicates if a diagnostic should be reported as an error - - - - - Indicates if a diagnostic should be reported as a warning - - - - - Indicates if a diagnostic should be reported as an informational - - - - - Format the core of the diagnostic as a string. Doesn't include the range information. - - - - - Eagerly format a PhasedDiagnostic return as a new PhasedDiagnostic requiring no formatting of types. - - - - - Get the number associated with a diagnostic - - - - - Get the location associated with a diagnostic - - - - - For extra diagnostics - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - Contains logic to prepare, post-process, filter and emit compiler diagnsotics - - - - - Callback that returns a previously calculated 'Result and updates 'State accordingly. - - - - - Helper class for mapping signature files to implementation files and vice versa. - - - - - A function for querying a Trie (the Trie is defined within the function's context) - - - - - A node was found with one or more files that contain relevant definitions required for type-checking. - - - - A node was found but no file exposes data for the LongIdentifier in question. - - This could happen if there is a single file with a top-level module `module A.B`, - and we search for `A`. - Although the `A` path exists in the Trie, it does not contain any relevant definitions (beyond itself). - - - - - No node was found for the path in the trie. - - - - - Result of querying a Trie Node. - - - - - File identifiers and its content extract for dependency resolution - - - - - Being explicit about nested modules allows for easier reasoning what namespaces (paths) are open. - For example we can limit the scope of an `OpenStatement` to symbols defined inside the nested module. - - - - - Any identifier that has more than one piece (LongIdent or SynLongIdent) in it. - The last part of the identifier should not be included. - - - - - The `open X.Y.Z` syntax. - - - - - Any toplevel namespace a file might have. - In case a file has `module X.Y.Z`, then `X.Y` is considered to be the toplevel namespace - - - - - A significant construct found in the syntax tree of a file. - This construct needs to be processed in order to deduce potential links to other files in the project. - - - - - Child nodes - - - - - Information about this node. - - - - - Zero or more files that define the LongIdentifier represented by this node. - - - - - A node in the Trie structure. - - - - - Files that use this namespace but don't contain any types. - - - - - Files that expose types that are part of this namespace. - - - - - There is a subtle difference between a module and namespace. - A namespace does not necessarily expose a set of dependent files. - Only when the namespace exposes types that could later be inferred. - Children of a namespace don't automatically depend on each other for that reason - - - - - Combines the file name, index and parsed syntax tree of a file in a project. - - - - - Represents one or more identifiers in the syntax tree. - For example, `[ "X"; "Y"; "Z" ]` in `open X.Y.Z` - - - - - Represents the string value of a single identifier in the syntax tree. - For example, `"Hello"` in `module Hello`. - - - - - File name captured by ParsedInput.FileName. - - - - - The index of a file inside a project. - - - - - A Directed Acyclic Graph (DAG) of arbitrary nodes. - - - - - Create a simple Mermaid graph and save it under the path specified. - - - - - Print the contents of the graph to the standard output. - - - - - Create a reverse of the graph. - - - - - Create a transitive closure of the graph in O(n^2) time (but parallelize it). - The resulting graph contains edge A -> C iff the input graph contains a (directed) non-zero length path from A to C. - - - - - Build the graph. - - - - - Functions for operating on the Graph type. - - - - - Process all the files (in parallel) in a project to construct a Root TrieNode. - When the project has signature files, the implementation counterparts will not be processed. - - - - - Extract the FileContentEntries from the ParsedInput of a file. - - - - - Construct an approximate* dependency graph for files within a project, based on their ASTs. - - Maps the index of a signature file with the index of its implementation counterpart and vice versa. - The files inside a project. - A tuple consisting of a dictionary of FileIndex (alias for int) and a Trie - - - *The constructed graph is a supergraph of the "necessary" file dependency graph, - ie. if file A is necessary to type-check file B, the resulting graph will contain edge B -> A. - The opposite is not true, ie. if file A is not necessary to type-check file B, the resulting graph *might* contain edge B -> A. - This is because the graph resolution algorithm has limited capability as it is based on ASTs alone. - - - The file order is used by the resolution algorithm to remove edges not allowed by the language. - Ie. if file B preceeds file A, the resulting graph will not contain edge B -> A. - Hence this function cannot, as it stands, be used to help create a "reasonable" file ordering for an unordered set of files. - - - - - Process an open path (found in the ParsedInput) with a given FileContentQueryState. - This code is only used directly in unit tests. - - - - Query a TrieNode to find a certain path. - - This code is only used directly in unit tests. - - - - Logic for constructing a file dependency graph for the purposes of parallel type-checking. - - - - - An already processed node in the graph, with its result available - - - - - Information about the node in a graph, describing its relation with other nodes. - - - - - A generic method to generate results for a graph of work items in parallel. - Processes leaves first, and after each node has been processed, schedules any now unblocked dependants. - Returns a list of results, one per item. - Uses the Thread Pool to schedule work. - - Graph of work items - A function to generate results for a single item - Cancellation token - - An alternative scheduling approach is to schedule N parallel tasks that process items from a BlockingCollection. - My basic tests suggested it's faster, although confirming that would require more detailed testing. - - - - - Parallel processing of graph of work items with dependencies - - - - - Get the typing environment implied by the set of signature files and/or inferred signatures of implementation files checked so far - - - - - Get the typing environment implied by the set of implementation files checked so far - - - - - The inferred contents of the assembly, containing the signatures of all files. - - - - - The CcuThunk for the current assembly being checked - - - - - Represents the incremental type checking state for a set of inputs - - - - - State used to de-deduplicate module names along a list of file names - - - - - Check a single input and finish the checking - - - - - Check a closed set of inputs - - - - - Finish the checking of a closed set of inputs - - - - - Finish the checking of multiple inputs - - - - - Check one input, returned as an Eventually computation - - - - - Returns partial type check result for skipped implementation files. - - - - - Get the initial type checking state for a set of inputs - - - - - Get the initial type checking environment including the loading of mscorlib/System.Core, FSharp.Core - applying the InternalsVisibleTo in referenced assemblies and opening 'Checked' if requested. - - - - - Parse multiple input files from disk - - - - - Parse one input file - - - - - Parse one input source text - - - - - Parse one input stream - - - - - Process the #nowarn in an input and integrate them into the TcConfig - - - - - Process all the #r, #I etc. in an input. For non-scripts report warnings about ignored directives. - - - - - A general routine to process hash directives - - - - - Parse a single input (A signature file or implementation file) - - - - - Checks if a ParsedInput is using a module name that was already given and deduplicates the name if needed. - - - - - Contains logic to coordinate the parsing and checking of one or a group of files - - - - - Diagnostics seen while processing the compiler options implied root of closure - - - - - Diagnostics to show for root of closure (used by fsc.fs) - - - - - Diagnostics seen while processing resolutions - - - - - The #nowarns - - - - - The original #load references, including those that didn't resolve - - - - - The list of all sources in the closure with inputs when available, with associated parse errors and warnings - - - - - The list of references that were not resolved during load closure. - - - - - Was the SDK directory override given? - - - - - Whether we're decided to use .NET Framework analysis for this script - - - - - The resolved pacakge references along with the ranges of the #r positions in each file. - - - - - The resolved references along with the ranges of the #r positions in each file. - - - - - The source files along with the ranges of the #load positions in each file. - - - - - Analyze a script text and find the closure of its references. - Used from FCS, when editing a script file. - - - - - Analyze a set of script files and find the closure of their references. The resulting references are then added to the given TcConfig. - Used from fsi.fs and fsc.fs, for #load and command line. - - - - - Compute the load closure of a set of script files - - - - - The spec value describes the action of the argument, - and whether it expects a following parameter. - - - - - Apply args to TcConfigBuilder and return new list of source files - - - - - Parse and process a set of compiler options - - - - - Compiler Option Parser - - - - - Writes the XmlDocSig property of each element (field, union case, etc) - of the specified compilation unit to an XML document in a new text file. - - - - - Writes the XML document signature to the XmlDocSig property of each - element (field, union case, etc) of the specified compilation unit. - The XmlDocSig is the unique identifier of this XmlDoc in the generated Xml documentation file. - The full format is described at https://learn.microsoft.com/dotnet/csharp/language-reference/language-specification/documentation-comments#id-string-format - - - - - Optional static linking of all DLLs that depend on the F# Library, plus other specified DLLs - - - - - Represents the configuration settings used to perform strong-name signing - - - - - Get the object used to perform strong-name signing - - - - - Validate the attributes and configuration settings used to perform strong-name signing - - - - - Get the SigningInfo for specific values(delaysign, tcConfig.publicsign, signer, container) - - - - - For unit testing - - - - - For unit testing - - - - - For unit testing - - - - - Put together all the pieces of information to create the overall IL ModuleDef for - the generated assembly - - - - - Helpers for finding attributes - - - - - Called when 'too many errors' has occurred - - - - - Called when a diagnostic occurs - - - - - An diagnostic logger that reports errors up to some maximum, notifying the exiter when that maximum is reached - - Used only in LegacyHostedCompilerForTesting - - - - - The default DiagnosticsLoggerProvider implementation, reporting messages to the Console up to the maxerrors maximum - - - - - DiagnosticLoggers can be sensitive to the TcConfig flags. During the checking - of the flags themselves we have to create temporary loggers, until the full configuration is - available. - - - - - Read the parallelReferenceResolution flag from environment variables - - - - - The main (non-incremental) compilation entry point used by fsc.exe - - - - - Indicates that the XML for the documentation can be found in a .xml documentation file for the given DLL, using the given signature key - - - - - The text for documentation for in-memory references. - - - - - No documentation is available - - - - - Describe a comment as either a block of text or a file+signature reference into an intellidoc file. - - - - - Types whose static members and nested types is opened with this declaration. - - - - - The syntactic target of the declaration - - - - - Range of the open declaration. - - - - - Modules or namespaces which is opened with this declaration. - - - - - The syntactic target of the declaration - - - - - If it's `namespace Xxx.Yyy` declaration. - - - - - Scope in which open declaration is visible. - - - - - Represents open declaration in F# code. - - - - - Get the range of the name of the attribute - - - - - The named arguments for the attribute - - - - - Indicates if the attribute type is in an unresolved assembly - - - - - The arguments to the constructor for the attribute - - - - - The type of the attribute - - - - - Indicates if attribute matchies the full name of the given type parameter - - - - - Format the attribute using the rules of the given display context - - - - - Represents a custom attribute attached to F# source code or a compiler .NET component - - - - - Get the type definition for a type - - - - - Indicates this is a named type in an unresolved assembly - - - - - Indicates if the type is a tuple type (reference or struct). The GenericArguments property returns the elements of the tuple type. - - - - - Indicates if the type is a struct tuple type. The GenericArguments property returns the elements of the tuple type. - - - - - Indicates if the type is a measure type. - - - - - Indicates if the type is a variable type, whether declared, generalized or an inference type parameter - - - - - Indicates if the type is a function type. The GenericArguments property returns the domain and range of the function type. - - - - - Indicates if the type is an anonymous record type. The GenericArguments property returns the type instantiation of the anonymous record type - - - - - Indicates this is an abbreviation for another type - - - - - Indicates if the type is constructed using a named entity, including array and byref types - - - - - 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 - - - - - Canonical form of the type with abbreviations, measures, and F# tuples and functions erased. - - - - - The fully qualified name of the type or module without strong assembly name. - - - - - Get the base type, if any, taking into account the instantiation of this type - if it is an instantiation of a generic type. - - - - - Get the details of the anonymous record type. - - - - - Get all the interface implementations, by walking the type hierarchy, taking into account the instantiation of this type - if it is an instantiation of a generic type. - - - - - Get the type for which this is an abbreviation - - - - - Strip any outer abbreviations from the type - - - - - Adjust the types in a group of curried parameters and return type by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust the types in a group of curried parameters by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust the types in a group of parameters by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust the type in a single parameter by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust a group of types by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust the type by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Instantiate generic type parameters in a type - - - - - Format the type using the rules of the given display context - - - - - Format the type - with constraints - using the rules of the given display context - - - - - Format the type using the rules of the given display context - - - - - Format the type using the rules of the given display context, skipping type constraints - - - - - Internal use only. Create a ground type. - - - - - Get the type indicating signature of the active pattern - - - - - The names of the active pattern cases - - - - - The whole group name - - - - - Indicate this is a total active pattern - - - - - Try to get the entity in which the active pattern is declared - - - - - Represents all cases within an active pattern - - - - - XML documentation signature for the active pattern case, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - The name of the active pattern case - - - - - Index of the case in the pattern group - - - - - The group of active pattern cases this belongs to - - - - - The location of declaration of the active pattern case - - - - - A subtype of FSharpSymbol that represents a single case within an active pattern - - - - - The declared or inferred type of the parameter - - - - - The optional name of the parameter - - - - - Indicate this is a param array argument - - - - - Indicate this is an out argument - - - - - Indicate this is an optional argument - - - - - Indicate this is an in argument - - - - - The declaration location of the parameter - - - - - The declared attributes of the parameter - - - - - A subtype of FSharpSymbol that represents a parameter - - - - - XML documentation signature for the value, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - Get an associated setter method of the property - - - - - Get the logical name of the member - - - - - Indicates if this is a [<Literal>] value, and if so what value? (may be null) - - - - - Indicated if this is a value - - - - - Indicated if this is a value compiled to a method - - - - - Indicates if the member, function or value is in an unresolved assembly - - - - - Indicates if this is an F# type function - - - - - Indicates if this is a value that has been referenced - - - - - Indicates if this is a ref cell - - - - - Indicates if this is a setter method for a property, or a use of a property in setter mode - - - - - Indicates if this is a getter method for a property, or a use of a property in getter mode - - - - - Indicates if this is a property member - - - - - Indicates if this is an 'override', 'default' or an explicit implementation of an interface member - - - - - Indicates if this is a mutable value - - - - - Indicates if this is a module or member value - - - - - Indicates if this is a method member - - - - - Indicates if this is the "x" in "member x.M = ..." - - - - - Indicates if this is a member, including extension members? - - - - - Indicates if this is an instance member in compiled code. - - Explanatory note: some members such as IsNone and IsSome on types with UseNullAsTrueValue appear - as instance members in F# code but are compiled as static members. - - - - - Indicates if this is an instance member, when seen from F#? - - - - - Indicates if this is an implicit constructor? - - - - - Indicated if this is a function - - - - - Indicates if this is an extension member? - - - - - Indicates if this is an explicit implementation of an interface member - - - - - Indicates if this is a remove method for an event - - - - - Indicates if this is an add method for an event - - - - - Indicates if this is an event member - - - - - Indicates if this is an abstract member? - - - - - Indicates if this is the "x" in "type C() as x = ..." - - - - - Indicates if this is a constructor. - - - - - Indicates if this is a compiler generated value - - - - - Indicates if this is "base" in "base.M(...)" - - - - - Indicates if this value or member is an F# active pattern - - - - - Get a result indicating if this is a must-inline value - - - - - Gets the list of the abstract slot signatures implemented by the member - - - - - Indicates if the value has a signature file counterpart - - - - - Indicates if this is a property and there exists an associated setter method - - - - - Indicates if this is a property and there exists an associated getter method - - - - - Get an associated getter method of the property - - - - - Get the typars of the member, function or value - - - - - Safe version of `FullType`. - - - - - Get the full type of the member, function or value when used as a first class value - - - - - Get an associated remove method of an event - - - - - Indicate if an event can be considered to be a property for the F# type system of type IEvent or IDelegateEvent. - In this case ReturnParameter will have a type corresponding to the property type. For - non-standard events, ReturnParameter will have a type corresponding to the delegate type. - - - - - Gets the event symbol implied by the use of a property, - for the case where the property is actually an F#-declared CLIEvent. - - Uses of F#-declared events are considered to be properties as far as the language specification - and this API are concerned. - - - - - Get an associated delegate type of an event - - - - - Get an associated add method of an event - - - - - Get the name as presented in F# error messages and documentation - - - - - Get the enclosing entity for the definition - - - - - Get the declaration location of the member, function or value - - - - List of list of parameters, where each nested item represents a defined parameter - - Typically, there is only one nested list. - However, code such as 'f (a, b) (c, d)' contains two groups, each with two parameters. - In that example, there is a list made up of two lists, each with a parameter. - - - - - Get 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 collection of values. - - - - - Get the logical enclosing entity, which for an extension member is type being extended - - - - - Get the accessibility information for the member, function or value - - - - - Full name with last part replaced with display name. - - - - - Full operator compiled name. - - - - - Check if this method has an entrpoint that accepts witness arguments and if so return - the name of that entrypoint and information about the additional witness arguments - - - - - Get the signature text to include this Symbol into an existing signature file. - - - - - Format the type using the rules of the given display context - - - - Gets the overloads for the current method. - - - Indicates whether to filter the overloads to match the number of parameters in the current symbol - - - - - Format the type using the rules of the given display context - - - - - A subtype of F# symbol that represents an F# method, property, event, function or value, including extension members. - - - - - Indicates the value is aggressively inlined by the .NET runtime - - - - - Indicates the value is never inlined - - - - - Indicates the value is optionally inlined - - - - - Indicates the value is always inlined in statically compiled code - - - - - Gets further information about a choice constraint - - - - - Gets further information about a member constraint - - - - - Indicates a constraint that a type is an unmanaged type - - - - - Indicates a constraint that a type has a 'null' value - - - - - Indicates a constraint that is a type is a simple choice between one of the given ground types. Used by printf format strings. - - - - - Indicates a constraint that a type has a parameterless constructor - - - - - Indicates a constraint that a type is a reference type - - - - - Indicates a constraint that a type is a non-Nullable value type - - - - - Indicates a constraint that a type has a member with the given signature - - - - - Indicates a constraint that a type supports F# generic equality - - - - - Indicates a constraint that a type is an enum with the given underlying - - - - - Indicates a constraint that a type is a delegate from the given tuple of args to the given return type - - - - - Indicates a default value for an inference type variable should it be neither generalized nor solved - - - - - Indicates a constraint that a type supports F# generic comparison - - - - - Indicates a constraint that a type is a subtype of the given type - - - - - Gets further information about an enumeration constraint - - - - - Gets further information about a delegate constraint - - - - - Gets further information about a defaults-to constraint - - - - - Gets further information about a coerces-to constraint - - - - - Represents a constraint on a generic type parameter - - - - - Get the default type associated with the 'defaults to' constraint - - - - - Get the priority off the 'defaults to' constraint - - - - - Represents further information about a 'defaults to' constraint on a generic type parameter - - - - - Get the tupled argument type required by the constraint - - - - - Get the return type required by the constraint - - - - - Represents further information about a delegate constraint on a generic type parameter - - - - - Get the types that may be used to satisfy the constraint - - - - - Get the return type of the method required by the constraint - - - - - Get the name of the method required by the constraint - - - - - Indicates if the the method required by the constraint must be static - - - - - Get the argument types of the method required by the constraint - - - - - Represents further information about a member constraint on a generic type parameter - - - - - Get the range of the construct - - - - - Get the name of the static parameter - - - - - Get the kind of the static parameter - - - - - Indicates if the static parameter is optional - - - - - Get the default value for the static parameter - - - - - Get the declaration location of the static parameter - - - - - A subtype of FSharpSymbol that represents a static parameter to an F# type provider - - - - - Get the XML documentation for the entity - - - - - Get the name of the generic parameter - - - - - Indicates if this is a statically resolved type variable - - - - - Indicates if this is a measure variable - - - - - Indicates if this is a compiler generated type parameter - - - - - Get the range of the generic parameter - - - - - Get the declared or inferred constraints for the type parameter - - - - - Get the declared attributes of the type parameter. - - - - - A subtype of FSharpSymbol that represents a generic parameter for an FSharpSymbol - - - - - Represents the rights of a compilation to access symbols - - - - - Get the XML documentation signature for .xml file lookup for the field, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - Get the attributes attached to generated property - - - - - Get the name of the field - - - - - Get the default initialization info, for static literals - - - - - Indicates if the field is declared volatile - - - - - Indicates if the record field is for a type in an unresolved assembly - - - - - Indicates if the field is declared in a union case - - - - - Indicates a static field - - - - - Indicates if the field name was generated by compiler (e.g. ItemN names in union cases and DataN in exceptions). - This API returns true for source defined symbols only. - - - - - Indicates if the field is declared 'static' - - - - - Indicates if the field has a literal value - - - - - Indicates if the field declared is declared 'DefaultValue' - - - - - Indicates a compiler generated field, not visible to Intellisense or name resolution - - - - - Is this a field from an anonymous record type? - - - - - Get the type of the field, w.r.t. the generic parameters of the enclosing type constructor - - - - - Get the attributes attached to generated field - - - - - Returns the declaring union case symbol - - - - - Get the declaring entity of this field, if any. Fields from anonymous types do not have a declaring entity - - - - - Get the declaration location of the field - - - - - If the field is from an anonymous record type then get the details of the field including the index in the sorted array of fields - - - - - Indicates if the declared visibility of the field, not taking signatures into account - - - - - A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language - - - - - The sorted labels of the anonymous type - - - - - Names of any enclosing types of the compiled form of the anonymous type (if the anonymous type was defined as a nested type) - - - - - The name of the compiled form of the anonymous type - - - - - The assembly where the compiled form of the anonymous type is defined - - - - - A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language - - - - - Get the XML documentation signature for .xml file lookup for the union case, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - Get the type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it - - - - - Get the name of the union case - - - - - Indicates if the union case is for a type in an unresolved assembly - - - - - Indicates if the union case has field definitions - - - - - Get the data carried by the case. - - - - - Get the declaring entity of the case - - - - - Get the range of the name of the case - - - - - Get the name of the case in generated IL code - - - - - Get the attributes for the case, attached to the generated static method to make instances of the case - - - - - Indicates if the declared visibility of the union constructor, not taking signatures into account - - - - - A subtype of FSharpSymbol that represents a union case as seen by the F# language - - - - - Get the name of the abstract slot - - - - - Get the generic arguments of the abstract slot - - - - - Get the generic arguments of the type defining the abstract slot - - - - - Get the declaring type of the abstract slot - - - - - Get the return type of the abstract slot - - - - - Get the arguments of the abstract slot - - - - - Represents the signature of an abstract slot of a class or interface - - - - - The declared or inferred type of the parameter - - - - - The optional name of the parameter - - - - - Indicate this is an out argument - - - - - Indicate this is an optional argument - - - - - Indicate this is an in argument - - - - - The declared attributes of the parameter - - - - - Represents a parameter in an abstract method of a class or interface - - - - - Get the return type of the delegate signature - - - - - Get the argument types of the delegate signature - - - - - Represents a delegate signature in an F# symbol - - - - - Get the XML documentation signature for the entity, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - Indicates if the type prefers the "tycon<a,b>" syntax for display etc. - - - - - Get the cases of a union type - - - - - Get the full name of the type or module if it is available - - - - - Get the static parameters for a provided type - - - - - Get the declared accessibility of the representation, not taking signatures into account - - - - - Get the fully qualified name of the type or module - - - - - Get the modules and types defined in a module, or the nested types of a type - - - - - Get the namespace containing the type or module, if any. Use 'None' for item not in a namespace. - - - - - Get the properties, events and methods of a type definitions, or the functions and values of a module - - - - - Get the name of the type or module, possibly with `n mangling - - - - - Indicates if the entity is a struct or enum - - - - - Indicates if the entity is in an unresolved assembly - - - - - Indicates if the entity is a 'fake' symbol related to a static instantiation of a type provider - - - - - Indicates if the entity is a generated provided type - - - - - Indicates if the entity is an erased provided type - - - - - Indicates if the entity is a provided type - - - - - Indicates if the entity is a type definition for a reference type where the implementation details are hidden by a signature - - - - - Indicates if the entity is a part of a namespace path - - - - - Indicates if the entity is a measure definition - - - - - Indicates if the entity is an interface type definition - - - - - Indicates if the entity is union type - - - - - Indicates if the entity is record type - - - - - Indicates if the entity is an F# module definition - - - - - Indicates an F# exception declaration - - - - - Indicates if the entity is a measure, type or exception abbreviation - - - - - Indicates if this is a reference to something in an F#-compiled assembly - - - - - Indicates if the entity is an enum type definition - - - - - Indicates if the entity is a delegate type definition - - - - - Indicates if the entity is a class type definition - - - - - Indicates if is the 'byref<_>' type definition used for byref types in F#-compiled assemblies - - - - - Check if the entity inherits from System.Attribute in its type hierarchy - - - - - Indicates if the entity is an array type - - - - - Indicates if the entity is an abstract class - - - - - Indicates that a module is compiled to a class with the given mangled name. The mangling is reversed during lookup - - - - - Indicates if 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 - - - - - Get the full name of the type or module - - - - - Get the fields of a record, class, struct or enum from the perspective of the F# language. - This includes static fields, the 'val' bindings in classes and structs, and the value definitions in enums. - For classes, the list may include compiler generated fields implied by the use of primary constructors. - - - - - Indicates if the type is a delegate with the given Invoke signature - - - - - Get the name of the type or module as displayed in F# code - - - - - Get the enclosing entity for the definition - - - - - Get the declared interface implementations - - - - - Get the declaration location for the type constructor - - - - - Get the compiled name of the type or module, possibly with `n mangling. This is identical to LogicalName - unless the CompiledName attribute is used. - - - - - The fully qualified name of the type or module without strong assembly name. - - - - - Get the base type, if any - - - - - Get the declared attributes for the type - - - - - Get the rank of an array type - - - - - Get all the interface implementations, by walking the type hierarchy - - - - - Get all compilation paths, taking `Module` suffixes into account. - - - - - Get all active pattern cases defined in all active patterns in the module. - - - - - Get the declared accessibility of the type - - - - - Get the path used to address the entity (e.g. "Namespace.Module1.NestedModule2"). Gives - "global" for items not in a namespace. - - - - - Get the type abbreviated by an F# type abbreviation - - - - - Get the source text of the entity's signature to be used as metadata. - - - - - Safe version of `GetMembersFunctionsAndValues`. - - - - - Safe version of `FullName`. - - - - - Safe version of `DisplayName`. - - - - - Safe version of `CompiledName`. - - - - - Public nested entities (methods, functions, values, nested modules). - - - - - Instantiates FSharpType - - - - - A subtype of FSharpSymbol that represents a type definition or module as seen by the F# language - - - - - The (non-nested) module and type definitions in this signature - - - - - Get the declared attributes for the assembly. - Only available when parsing an entire project. - - - - - Safe version of `Entities`. - - - - - Find entity using compiled names - - - - - Represents an inferred signature of part of an assembly as seen by the F# language - - - - - The simple name for the assembly - - - - - The qualified name of the assembly - - - - - Indicates if the assembly was generated by a type provider and is due for static linking - - - - - The file name for the assembly, if any - - - - - The contents of the this assembly - - - - - Represents an assembly as seen by the F# language - - - - - Get the signature location for the symbol if it was declared in an implementation - - - - - Get the implementation location for the symbol if it was declared in a signature that has an implementation - - - - - Get a textual representation of the full name of the symbol. The text returned for some symbols - may not be a valid identifier path in F# code, but rather a human-readable representation of the symbol. - - - - - Gets the display name for the symbol where double backticks are not added for non-identifiers - - - - - Gets the display name for the symbol. Double backticks are added if the name is not a valid identifier. - - For FSharpParameter symbols without a name for the paramater, this returns "````" - - - - - Get the declaration location for the symbol - - - - - Get the attributes for the symbol, if any - - - - - Get the assembly declaring this symbol - - - - - Get the declared accessibility of the symbol, if any - - - - - Try to get an attribute matching the full name of the given type parameter - - - - - Return true if two symbols are effectively the same when referred to in F# source code text. - This sees through signatures (a symbol in a signature will be considered effectively the same as - the matching symbol in an implementation). In addition, other equivalences are applied - when the same F# source text implies the same declaration name - for example, constructors - are considered to be effectively the same symbol as the corresponding type definition. - - This is the relation used by GetUsesOfSymbol and GetUsesOfSymbolInFile. - - - - - Computes if the symbol is accessible for the given accessibility rights - - - - - Indicates if this symbol has an attribute matching the full name of the given type parameter - - - - - A hash compatible with the IsEffectivelySameAs relation - - - - - Represents a symbol in checked F# source code or a compiled .NET component. - - The subtype of the symbol may reveal further information and can be one of FSharpEntity, FSharpUnionCase - FSharpField, FSharpGenericParameter, FSharpStaticParameter, FSharpMemberOrFunctionOrValue, FSharpParameter, - or FSharpActivePatternCase. - - - - - Causes type signatures to be formatted with suffix-style generic parameters, - for example `int list` - - - - - Causes type signatures to be formatted with prefix-style generic parameters, - for example `list<int>`. - - - - - Represents the information needed to format types and other information in a style - suitable for use in F# source text at a particular source location. - - Acquired via GetDisplayEnvAtLocationAlternate and similar methods. May be passed - to the Format method on FSharpType and other methods. - - - - - Indicates the symbol has public accessibility. - - - - - Indicates the symbol has protected accessibility. - - - - - Indicates the symbol has private accessibility. - - - - - Indicates the symbol has internal accessibility. - - - - - The underlying Accessibility - - - - - Indicates the accessibility of a symbol, as seen by the F# language - - - - - The signature of the implemented abstract slot - - - - - The generic parameters of the method - - - - - The parameters of the method - - - - - The expression that forms the body of the method - - - - - Represents a checked method in an object expression, as seen by the F# language. - - - - - The type of the expression - - - - - The range of the expression - - - - - The immediate sub-expressions of the expression. - - - - - Represents a checked and reduced expression, as seen by the F# language. The active patterns - in 'FSharp.Compiler.SourceCodeServices' can be used to analyze information about the expression. - - Pattern matching is reduced to decision trees and conditional tests. Some other - constructs may be represented in reduced form. - - - - - Represents the declaration of a static initialization action - - - - - Represents the declaration of a member, function or value, including the parameters and body of the member - - - - - Represents the declaration of a type - - - - - Represents a declaration in an implementation file, as seen by the F# language - - - - - The qualified name acts to fully-qualify module specifications and implementations - - - - - Indicates if the implementation file is a script - - - - - Indicates if the implementation file has an explicit entry point - - - - - Get the system path of the implementation file - - - - - Get the declarations that make up this implementation file - - - - - Represents the definitional contents of a single file or fragment in an assembly, as seen by the F# language - - - - - The contents of the implementation files in the assembly - - - - - Represents the definitional contents of an assembly, as seen by the F# language - - - - - Indicates a witness argument index from the witness arguments supplied to the enclosing method - - - - - Matches expressions for an unresolved call to a trait - - - - - Matches object expressions, returning the base type, the base call, the overrides and the interface implementations - - - - - Matches expressions which set a field in a .NET type - - - - - Matches expressions which fetch a field from a .NET type - - - - - Matches expressions which are IL assembly code - - - - - Matches expressions which create an instance of a delegate type - - - - - Matches try/with expressions - - - - - Matches try/finally expressions - - - - - Matches while loops - - - - - Matches fast-integer loops (up or down) - - - - - Matches debug points at leaf expressions in control flow - - - - - Matches sequential expressions - - - - - Matches expressions which take the address of a location - - - - - Matches constant expressions, including signed and unsigned integers, strings, characters, booleans, arrays - of bytes and arrays of unit16. - - - - - Matches default-value expressions, including null expressions - - - - - Matches expressions which set the contents of a mutable variable - - - - - Matches expressions which set the contents of an address - - - - - Matches expressions which test the runtime type of a value - - - - - Matches array expressions - - - - - Matches expressions which coerce the type of a value - - - - - Matches expressions which get a value from a tuple - - - - - Matches tuple expressions - - - - - Matches expressions which test if an expression corresponds to a particular union case - - - - - Matches expressions which gets the tag for a union case - - - - - Matches expressions which set a field from a union case (only used in FSharp.Core itself) - - - - - Matches expressions which get a field from a union case - - - - - Matches expressions which create an object corresponding to a union case - - - - - Matches expressions which set a field in a record or class - - - - - Matches expressions which get a field from a record or class - - - - - Matches expressions getting a field from an anonymous record. The integer represents the - index into the sorted fields of the anonymous record. - - - - - Matches anonymous record expressions - - - - - Matches record expressions - - - - - Matches expressions which are let-rec definitions - - - - - Matches expressions which are quotation literals - - - - - Matches expressions which are uses of the 'base' value - - - - - Matches expressions which are uses of the 'this' value - - - - - Matches expressions which are calls to object constructors - - - - - Like Call but also indicates witness arguments - - - - - Matches expressions which are calls to members or module-defined functions. When calling curried functions and members the - arguments are collapsed to a single collection of arguments, as done in the compiled version of these. - - - - - Matches expressions which are let definitions - - - - - Matches expressions which are conditionals - - - - - Matches expressions which are lambda abstractions - - - - - Special expressions at the end of a conditional decision structure in the decision expression node of a DecisionTree . - The given expressions are passed as values to the decision tree target. - - - - - Matches expressions with a decision expression, each branch of which ends in DecisionTreeSuccess passing control and values to one of the targets. - - - - - Matches expressions which are type abstractions - - - - - Matches expressions which are the application of function values - - - - - Matches expressions which are uses of values - - - - - A collection of active patterns to analyze expressions - - - - - Returns (originalEntity, abbreviatedEntity, abbreviatedType) - - - - - Patterns over FSharpSymbol and derivatives. - - - - - Get the captured diagnostics - - - - - Create the diagnostics logger - - - - - An error logger that capture errors, filtering them according to warning levels etc. - - - - - Gets the sub-category for the diagnostic - - - - - Gets the start line for the diagnostic - - - - - Gets the start column for the diagnostic - - - - - Gets the start position for the diagnostic - - - - - Gets the severity for the diagnostic - - - - - Gets the range for the diagnostic - - - - - Gets the message for the diagnostic - - - - - Gets the file name for the diagnostic - - - - - Gets the contextually-relevant data to each particular diagnostic for things like code fixes - - - - - Gets the full error number text e.g "FS0031" - - - - - Gets the number prefix for the diagnostic, usually "FS" but may differ for analyzers - - - - - Gets the number for the diagnostic - - - - - Gets the end line for the diagnostic - - - - - Gets the end column for the diagnostic - - - - - Gets the end position for the diagnostic - - - - - Newlines are recognized and replaced with (ASCII 29, the 'group separator'), - which is decoded by the IDE with 'NewlineifyErrorString' back into newlines, so that multi-line errors can be displayed in QuickInfo - - - - - Newlines are recognized and replaced with (ASCII 29, the 'group separator'), - which is decoded by the IDE with 'NewlineifyErrorString' back into newlines, so that multi-line errors can be displayed in QuickInfo - - - - - Creates a diagnostic, e.g. for reporting from an analyzer - - - - - Represents a diagnostic produced by the F# compiler - - - - - Supported kinds of diagnostics by this service. - - - - - For activities following the dotnet distributed tracing concept - https://learn.microsoft.com/dotnet/core/diagnostics/distributed-tracing-concepts?source=recommendations - - - - - For activities following the dotnet distributed tracing concept - https://learn.microsoft.com/dotnet/core/diagnostics/distributed-tracing-concepts?source=recommendations - - - - - Argument identifier range within signature file - - - - - Argument name in signature file - - - - - Argument identifier range within implementation file - - - - - Argument name in implementation file - - - - - Additional data for 'argument names in the signature and implementation do not match' diagnostic - - - - - Represents F# value in signature file - - - - - Represents F# value in implementation file - - - - - Additional data for diagnostics about a value whose declarations differ in signature and implementation - - - - - Represents F# field in signature file - - - - - Represents F# field in implementation file - - - - - Additional data for diagnostics about a field whose declarations differ in signature and implementation - - - - - Represents F# type of the expression - - - - - Additional data for 'This expression is a function value, i.e. is missing arguments' diagnostic - - - - - Represents F# type expected in the current context - - - - - Represents the information needed to format types - - - - - The context in which the type mismatch was found - - - - - Represents F# type type actual in the current context - - - - - Additional data for type-mismatch-like (usually with ErrorNumber = 1) diagnostics - - - - - Contextually-relevant data to each particular diagnostic - - - - - The type equation comes from a sequence expression - - - - - The type equation comes from a pattern match guard - - - - - The type equation comes from a return type of a pattern match clause (not the first clause) - - - - - The type equation comes from an downcast where a upcast could be used - - - - - The type equation comes from a runtime type test - - - - - The type equation comes from a yield in a computation expression - - - - - The type equation comes from a return in a computation expression - - - - - The type equation comes from a list or array constructor - - - - - The type equation comes from the verification of a tuple in record fields - - - - - The type equation comes from the verification of record fields - - - - - The type equation comes from a type check of the result of an else branch - - - - - The type equation comes from an omitted else branch - - - - - The type equation comes from an IF expression - - - - - No context was given - - - - - Information about the context of a type equation in type-mismatch-like diagnostic - - - - - Given a set of names, uses and a string representing an unresolved identifier, - returns a list of suggested names if there are any feasible candidates. - - - - - Given a DiagnosticKind, returns the string representing the error message for that diagnostic. - - - - - Exposes compiler diagnostic error messages. - - - - - Create a tokenizer for a line of this source file - - - - - Create a tokenizer for a line of this source file using a buffer filler - - - - - Create a tokenizer for a source file. - - - - - Tokenizer for a source file. Holds some expensive-to-compute resources at the scope of the file. - - - - - Scan one token from the line - - - - - Get a default lexer state for a color state. - - NOTE: This may result in an inaccurate lexer state - not taking into account things such as the #if/#endif and string interpolation context - within the file - - - - - Get the color state from the lexer state - - - - - Object to tokenize a line of F# source code, starting with the given lexState. The lexState should be FSharpTokenizerLexState.Initial 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. FSharpTokenColorKind and FSharpTokenCharKind. 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. - - - - - The full length consumed by this match, including delayed tokens (which can be ignored in naive lexers) - - - - - Provides additional information about the token - - - - - The tag is an integer identifier for the token - - - - - Actions taken when the token is typed - - - - - Gives an indication of the class to assign to the token an IDE - - - - - Right column of the token. - - - - - Left column of the token. - - - - - Information about a particular token from the tokenizer - - - - - Gives an indication of the class to assign to the characters of the token an IDE - - - - - Gives an indication of what should happen when the token is typed in an IDE - - - - - Gives an indication of the color class to assign to the token an IDE - - - - - Represents stable information for the state of the lexing engine at the end of a line - - - - - Represents encoded information for the end-of-line continuation of lexing - - - - - All the keywords in the F# language - - - - - A lookup from keywords to their descriptions - - - - - Keywords paired with their descriptions. Used in completion and quick info. - - - - - Add backticks if the identifier is a keyword. - Remove backticks if present and not needed. - - - - - Indicates the token is keyword `new` - - - - - Indicates the token is keyword `with` in #light - - - - - Indicates the token is keyword `with` - - - - - Indicates the token is keyword `try` - - - - - Indicates the token is keyword `class` - - - - - Indicates the token is keyword `struct` - - - - - Indicates the token is keyword `else` - - - - - Indicates the token is keyword `then` - - - - - Indicates the token is keyword `function` - - - - - Indicates the token is keyword `do` - - - - - Indicates the token is keyword `begin` - - - - - Indicates the token is a line comment - - - - - Indicates the token is a comment - - - - - Indicates the token is a whitespace - - - - - Indicates the token is a `"` - - - - - Indicates the token is a `<-` - - - - - Indicates the token is a `->` - - - - - Indicates the token is a `||` - - - - - Indicates the token is a `:=` - - - - - Indicates the token is a `~` - - - - - Indicates the token is a `@@` - - - - - Indicates the token is a `::` - - - - - Indicates the token is a `|` - - - - - Indicates the token is a `|` - - - - - Indicates the token is a `:?` - - - - - Indicates the token is a `:?>` - - - - - Indicates the token is a `:>` - - - - - Indicates the token is a `_` - - - - - Indicates the token is a `..` - - - - - Indicates the token is a `..^` - - - - - Indicates the token is a `..` - - - - - Indicates the token is a `..` - - - - - Indicates the token is a `.` - - - - - Indicates the token is a `,` - - - - - Indicates the token is a `;` - - - - - Indicates the token is a `=` - - - - - Indicates the token is a `:` - - - - - Indicates the token is a `?` - - - - - Indicates the token is a `^` - - - - - Indicates the token is a `%` - - - - - Indicates the token is a `%` - - - - - Indicates the token is a `*` - - - - - Indicates the token is a `-` - - - - - Indicates the token is a `+` or `-` - - - - - Indicates the token is a `|]` - - - - - Indicates the token is a `[|` - - - - - Indicates the token is a `>` - - - - - Indicates the token is a `<` - - - - - Indicates the token is a `>]` - - - - - Indicates the token is a `[<` - - - - - Indicates the token is a `}` - - - - - Indicates the token is a `{` - - - - - Indicates the token is a `]` - - - - - Indicates the token is a `[` - - - - - Indicates the token is a `)` - - - - - Indicates the token is a `(` - - - - - Indicates the token is a part of an interpolated string - - - - - Indicates the token is a part of an interpolated string - - - - - Indicates the token is a part of an interpolated string - - - - - Indicates the token is a part of an interpolated string - - - - - Indicates the token is a string (synonym for FSharpTokenTag.String) - - - - - Indicates the token is an identifier (synonym for FSharpTokenTag.Identifier) - - - - - Indicates the token is a string - - - - - Indicates the token is an identifier - - - - - Some of the values in the field FSharpTokenInfo.Tag - - - - - A parsed signature file - - - - - A parsed implementation file - - - - - Gets the #nowarn and other scoped pragmas - - - - - Gets the syntax range of this construct - - - - - Gets the qualified name used to help match signature and implementation files - - - - - Gets a set of all identifiers used in this parsed input. Only populated if captureIdentifiersWhenParsing option was used. - - - - - Gets the file name for the parsed input - - - - - Represents the syntax tree for a parsed implementation or signature file - - - - - Represents the full syntax tree, file name and other parsing information for a signature file - - - - - Represents the full syntax tree, file name and other parsing information for an implementation file - - - - - The name of the file - - - - - Gets the syntax range of this construct - - - - - The identifier for the name of the file - - - - - Represents a qualifying name for anonymous module specifications and implementations, - - - - - A pragma to turn a warning off - - - - - Represents a scoped pragma - - - - - Represents a parsed signature file made up of fragments - - - - - Represents a parsed implementation file made up of fragments - - - - - Represents a parsed syntax tree for an F# Interactive interaction - - - - - A signature file namespace fragment - - - - - A signature file which is a module, 'module N' - - - - - A signature file which is an anonymous module, e.g. the signature file for the final file in an application - - - - - Represents the syntax tree for the contents of a parsed signature file - - - - - An implementation file fragment which declares a namespace fragment - - - - - An implementation file is a named module definition, 'module N' - - - - - An implementation file which is an anonymous module definition, e.g. a script - - - - - Represents the syntax tree for the contents of a parsed implementation file - - - - - Represents a parsed hash directive - - - - - Gets the syntax range of this construct - - - - - Represents a parsed hash directive argument - - - - - Gets the syntax range of this construct - - - - - Represents the definition of a module or namespace in a signature file - - - - - Gets the syntax range of this construct - - - - - Represents the definition of a module or namespace - - - - - A namespace is declared 'global' - - - - - A namespace is explicitly declared - - - - - A module is anonymously named, e.g. a script - - - - - A module is explicitly named 'module N' - - - - - Indicates if this is a module definition - - - - - Represents the kind of a module or namespace definition - - - - - A namespace fragment within a namespace in a signature file - - - - - A hash directive within a module or namespace in a signature file - - - - - An 'open' definition within a module or namespace in a signature file - - - - - An exception definition within a module or namespace in a signature file - - - - - A set of one or more type definitions within a module or namespace in a signature file - - - - - A 'val' definition within a module or namespace in a signature file, corresponding - to a 'let' definition in the implementation - - - - - A nested module definition within a module or namespace in a signature file - - - - - A module abbreviation definition within a module or namespace in a signature file - - - - - Gets the syntax range of this construct - - - - - Represents a definition within a module or namespace in a signature file - - - - - Represents the right hand side of an exception definition in a signature file - - - - - A 'open type' declaration - - - - - A 'open' declaration - - - - - Gets the syntax range of this construct - - - - - Represents the target of the open declaration - - - - - A namespace fragment within a module - - - - - A hash directive within a module - - - - - An attribute definition within a module, for assembly and .NET module attributes - - - - - An 'open' definition within a module - - - - - An 'exception' definition within a module - - - - - One or more 'type' definitions within a module - - - - - An 'expr' within a module. - - - - - A 'let' definition within a module - - - - - A nested module definition 'module X = ...' - - - - - A module abbreviation definition 'module X = A.B.C' - - - - - Gets the syntax range of this construct - - - - - Represents a definition within a module - - - - - An auto-property definition, F# syntax: 'member val X = expr' - - - - - A nested type definition, a feature that is not implemented - - - - - A 'val' definition within a class - - - - - An 'inherit' definition within a class - - - - - An interface implementation definition within a class - - - - - An abstract slot definition within a class or interface - - - - - A 'let' definition within a class - - - - - An implicit inherit definition, 'inherit <typ>(args...) as base' - - - - - An implicit constructor definition - - - - - A 'member' definition with get/set accessors within a type - - - - - A 'member' definition within a type - - - - - An 'open' definition within a type - - - - - Gets the syntax range of this construct - - - - - Represents a definition element within a type definition, e.g. 'member ... ' - - - - - Gets the syntax range of this construct - - - - - Represents a type or exception declaration 'type C = ... ' plus - any additional member definitions for the type - - - - - An exception definition - - - - - A simple type definition (record, union, abbreviation) - - - - - An object model type definition (class or interface) - - - - - Gets the syntax range of this construct - - - - - Represents the right hand side of a type or exception declaration 'type C = ... ' plus - any additional member definitions for the type - - - - - Gets the syntax range of this construct - - - - - Represents the right hand side of an exception declaration 'exception E = ... ' plus - any member definitions for the exception - - - - - Gets the syntax range of this construct - - - - - Represents the right hand side of an exception declaration 'exception E = ... ' - - - - - Represents the syntactic elements associated with the "return" of a function or method. - - - - - Represents the names and other metadata for the type parameters for a member or function - - - - - Represents the argument names and other metadata for a parameter for a member or function - - - - - SynValInfo(curriedArgInfos, returnInfo) - - - - - The argument names and other metadata for a member or function - - - - - Represents the syntax tree for a 'val' definition in an abstract slot or a signature file - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree associated with the name of a type definition or module - in signature or implementation. - - This includes the name, attributes, type parameters, constraints, documentation and accessibility - for a type definition or module. For modules, entries such as the type parameters are - always empty. - - - - - Represents the syntax tree for a field declaration in a record or class - - - - - The information for a type definition in a signature - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for a type definition in a signature - - - - - Indicates the right right-hand-side is a record, union or other simple type. - - - - - Indicates the right right-hand-side is a class, struct, interface or other object-model type - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for the right-hand-side of a type definition in a signature. - Note: in practice, using a discriminated union to make a distinction between - "simple" types and "object oriented" types is not particularly useful. - - - - - Full type spec given by 'UnionCase: ty1 * tyN -> rty'. Only used in FSharp.Core, otherwise a warning. - - - - - Normal style declaration - - - - - Represents the syntax tree for the right-hand-side of union definition, excluding members, - in either a signature or implementation. - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for one case in a union definition. - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for one case in an enum definition. - - - - - An exception definition, "exception E = ..." - - - - - An abstract definition, "type X" - - - - - A type abbreviation, "type X = A.B.C" - - - - - A type defined by using an IL assembly representation. Only used in FSharp.Core. - - F# syntax: "type X = (# "..."#) - - - - - An object oriented type definition. This is not a parse-tree form, but represents the core - type representation which the type checker splits out from the "ObjectModel" cases of type definitions. - - - - - A record type definition, type X = { A: int; B: int } - - - - - An enum type definition, type X = A = 1 | B = 2 - - - - - A union type definition, type X = A | B - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for the core of a simple type definition, in either signature - or implementation. - - - - - Represents the kind of a type definition whether explicit or inferred - - - - - A nested type definition in a signature file (an unimplemented feature) - - - - - A 'val' definition in a type in a signature file - - - - - An 'inherit' definition in a type in a signature file - - - - - An interface definition in a type in a signature file - - - - - A member definition in a type in a signature file - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for a member signature (used in signature files, abstract member declarations - and member constraints) - - - - - An artificial member kind used prior to the point where a - get/set property is split into two distinct members. - - - - - The member kind is property setter - - - - - The member kind is property getter - - - - - The member kind is not yet determined - - - - - The member is a object model constructor - - - - - The member is a class initializer - - - - - Note the member kind is actually computed partially by a syntax tree transformation in tc.fs - - - - - The kind of the member - - - - - The member was generated by the compiler - - - - - The member is 'final' - - - - - The member is an 'override' or explicit interface implementation - - - - - The member is a dispatch slot - - - - - The member is an instance member (non-static) - - - - - Represents the flags for a 'member' declaration - - - - - Represents the return information in a binding for a 'let' or 'member' declaration - - - - - Represents a binding for a 'let' or 'member' declaration - - - - - Is only populated during type-checking when an property has both a getter and setter. - It is used to track the fact that the getter and setter are part of the same property when they are desugared. - - - - - Represents extra information about the declaration of a value - - - - - The syntax range of the list of attributes - - - - - The list of attributes - - - - - List of attributes enclosed in [< ... >]. - - - - - The syntax range of the attribute - - - - - Is this attribute being applied to a property getter or setter? - - - - - Target specifier, e.g. "assembly", "module", etc. - - - - - The argument of the attribute, perhaps a tuple - - - - - The name of the type for the attribute - - - - - Represents an attribute - - - - - Gets the syntax range of part of this construct - - - - - Gets the syntax range of this construct - - - - - Represents a clause in a 'match' expression - - - - - Represents a set of bindings that implement an interface - - - - - A pattern arising from a parse error - - - - - Used internally in the type checker - - - - - &lt;@ expr @&gt;, used for active pattern arguments - - - - - A type test pattern ':? type ' - - - - - '?id' -- for optional argument names - - - - - The 'null' pattern - - - - - A record pattern - - - - - An array or a list as a pattern - - - - - A parenthesized pattern - - - - - A tuple pattern - - - - - A long identifier pattern possibly with argument patterns - - - - - A conjunctive pattern 'pat1 as pat2' - - - - - A conjunctive pattern 'pat1 & pat2' - - - - - A conjunctive pattern 'pat1 :: pat2' - - - - - A disjunctive pattern 'pat1 | pat2' - - - - - An attributed pattern, used in argument or declaration position - - - - - A typed pattern 'pat : type' - - - - - A name pattern 'ident' - - - - - A wildcard '_' in a pattern - - - - - A constant in a pattern - - - - - Gets the syntax range of this construct - - - - - Represents a syntax tree for an F# pattern - - - - - Represents a syntax tree for arguments patterns - - - - - Represents a simple set of variable bindings a, (a, b) or (a: Type, b: Type) at a lambda, - function definition or other binding point, after the elimination of pattern matching - from the construct, e.g. after changing a "function pat1 -> rule1 | ..." to a - "fun v -> match v with ..." - - - - - A static optimization conditional that activates for a struct - - - - - A static optimization conditional that activates for a particular type instantiation - - - - - Represents a syntax tree for a static optimization constraint in the F# core library - - - - - We have decided to use an alternative name in the pattern and related expression - - - - - We have not decided to use an alternative name in the pattern and related expression - - - - - Represents the alternative identifier for a simple pattern - - - - - An attributed simple pattern - - - - - A type annotated simple pattern - - - - - Indicates a simple pattern variable. - - altNameRefCell: - Normally 'None' except for some compiler-generated variables in desugaring pattern matching. - Pattern processing sets this reference for hidden variable introduced - by desugaring pattern matching in arguments. The info indicates an - alternative (compiler generated) identifier to be used because the - name of the identifier is already bound. - - isCompilerGenerated: true if a compiler generated name - isThisVal: true if 'this' variable in member - isOptional: true if a '?' is in front of the name - - - - - Represents a syntax tree for simple F# patterns - - - - - F# syntax: f?x - - - - - Debug points arising from computation expressions - - - - - F# syntax: interpolated string, e.g. "abc{x}" or "abc{x,3}" or "abc{x:N4}" - Note the string ranges include the quotes, verbatim markers, dollar sign and braces - - - - - 'use x = fixed expr' - - - - - Inserted for error recovery when there is "expr." and missing tokens or error recovery after the dot - - - - - Inserted for error recovery - - - - - Inserted for error recovery - - - - - Only used in FSharp.Core - - - - - Only used in FSharp.Core - - - - - Only used in FSharp.Core - - - - - Only used in FSharp.Core - - - - - F# syntax: 'while! ... do ...' - - - - - F# syntax: do! expr - Computation expressions only - - - - - F# syntax: match! expr with pat1 -> expr | ... | patN -> exprN - - - - - F# syntax: let! pat = expr in expr - F# syntax: use! pat = expr in expr - F# syntax: let! pat = expr and! ... and! ... and! pat = expr in expr - Computation expressions only - - - - - F# syntax: yield! expr - F# syntax: return! expr - Computation expressions only - - - - - F# syntax: yield expr - F# syntax: return expr - Computation expressions only - - - - - Used internally during type checking for translating computation expressions. - - - - - Used in parser error recovery and internally during type checking for translating computation expressions. - - - - - F# syntax: ... in ... - Computation expressions only, based on JOIN_IN token from lex filter - - - - - F# syntax: ((type1 or ... or typeN): (member-dig) expr) - - - - - F# syntax: &expr, &&expr - - - - - F# syntax: null - - - - - F# syntax: downcast expr - - - - - F# syntax: upcast expr - - - - - F# syntax: expr :?> type - - - - - F# syntax: expr :> type - - - - - F# syntax: expr :? type - - - - - F# syntax: expr.Items (e1) <- e2, rarely used named-property-setter notation, e.g. (stringExpr).Chars(3) <- 'a' - - - - - F# syntax: Type.Items(e1) <- e2, rarely used named-property-setter notation, e.g. Foo.Bar.Chars(3) <- 'a' - - - - - F# syntax: expr.[expr, ..., expr] <- expr - - - - - F# syntax: expr.[expr, ..., expr] - - - - - F# syntax: expr <- expr - - - - - F# syntax: expr.ident...ident <- expr - - - - - F# syntax: _.ident.ident - - - - - F# syntax: expr.ident.ident - - - - - F# syntax: ident.ident...ident <- expr - - - - - F# syntax: ident.ident...ident - - isOptional: true if preceded by a '?' for an optional named parameter - altNameRefCell: Normally 'None' except for some compiler-generated - variables in desugaring pattern matching. See SynSimplePat.Id - - - - - F# syntax: ident - Optimized representation for SynExpr.LongIdent (false, [id], id.idRange) - - - - - F# syntax: 'T (for 'T.ident). - - - - - F# syntax: if expr then expr - F# syntax: if expr then expr else expr - - - - - F# syntax: expr; expr - - isTrueSeq: false indicates "let v = a in b; v" - - - - - F# syntax: lazy expr - - - - - F# syntax: try expr finally expr - - - - - F# syntax: try expr with pat -> expr - - - - - F# syntax: let pat = expr in expr - F# syntax: let f pat1 .. patN = expr in expr - F# syntax: let rec f pat1 .. patN = expr in expr - F# syntax: use pat = expr in expr - - - - - F# syntax: expr<type1, ..., typeN> - - - - - F# syntax: f x - - flag: indicates if the application is syntactically atomic, e.g. f.[1] is atomic, but 'f x' is not - isInfix is true for the first app of an infix operator, e.g. 1+2 - becomes App(App(+, 1), 2), where the inner node is marked isInfix - - - - - F# syntax: assert expr - - - - - F# syntax: do expr - - - - - F# syntax: match expr with pat1 -> expr | ... | patN -> exprN - - - - - F# syntax: function pat1 -> expr | ... | patN -> exprN - - - - - 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 - parsedData keeps original parsed patterns and expression, - prior to transforming to "simple" patterns and iterated lambdas - - F# syntax: fun pat -> expr - - - - - F# syntax: { expr } - - - - - F# syntax: ^expr, used for from-end-of-collection indexing and ^T.Operation - - - - - F# syntax: expr.. - F# syntax: ..expr - F# syntax: expr..expr - F# syntax: * - A two-element range indexer argument a..b, a.., ..b. Also used to represent - a range in a list, array or sequence expression. - - - - - F# syntax: [ expr ], [| expr |] - - - - - F# syntax: 'for ... in ... do ...' - - - - - F# syntax: 'for i = ... to ... do ...' - - - - - F# syntax: 'while ... do ...' - - - - - F# syntax: { new ... with ... } - - - - - F# syntax: new C(...) - The flag is true if known to be 'family' ('protected') scope - - - - - F# syntax: { f1=e1; ...; fn=en } - inherit includes location of separator (for tooling) - copyOpt contains range of the following WITH part (for tooling) - every field includes range of separator after the field (for tooling) - - - - - F# syntax: [ e1; ...; en ], [| e1; ...; en |] - - - - - F# syntax: {| id1=e1; ...; idN=eN |} - F# syntax: struct {| id1=e1; ...; idN=eN |} - - - - - F# syntax: e1, ..., eN - - - - - F# syntax: expr: type - - - - - F# syntax: 1, 1.3, () etc. - - - - - F# syntax: <@ expr @>, <@@ expr @@> - - Quote(operator, isRaw, quotedSynExpr, isFromQueryExpression, m) - - - - - F# syntax: (expr) - - Parenthesized expressions. Kept in AST to distinguish A.M((x, y)) - from A.M(x, y), among other things. - - - - - Attempt to get the range of the first token or initial portion only - this - is ad-hoc, just a cheap way to improve a certain 'query custom operation' error range - - - - - Gets the syntax range of this construct - - - - - Indicates if this expression arises from error recovery - - - - - Represents a syntax tree for F# expressions - - - - - F# syntax: x: #I1 & #I2 - F# syntax: x: 't & #I1 & #I2 - Shorthand for x: 't when 't :> I1 and 't :> I2 - - - - - A type arising from a parse error - - - - - F# syntax: ^a or ^b, used in trait calls - - - - - F# syntax: a: b, used in signatures and type annotations - - - - - F# syntax: ident=1 etc., used in static parameters to type providers - - - - - F# syntax: const expr, used in static parameters to type providers - - - - - F# syntax: 1, "abc" etc, used in parameters to type providers - For the dimensionless units i.e. 1, and static parameters to provided types - - - - - F# syntax: for units of measure e.g. m^3, kg^1/2 - - - - - F# syntax: #type - - - - - F# syntax: typ with constraints - - - - - F# syntax: _ - - - - - F# syntax: 'Var - - - - - F# syntax: type -> type - - - - - F# syntax: type[] - - - - - F# syntax: {| id: type; ...; id: type |} - F# syntax: struct {| id: type; ...; id: type |} - - - - - F# syntax: type * ... * type - F# syntax: struct (type * ... * type) - - - - - F# syntax: type.A.B.C<type, ..., type> - - - - - F# syntax: type<type, ..., type> or type type or (type, ..., type) type - isPostfix: indicates a postfix type application e.g. "int list" or "(int, string) dict" - - - - - F# syntax: A.B.C - - - - - Gets the syntax range of this construct - - - - - Represents a syntax tree for F# types - - - - - List of type parameter declarations with optional type constraints, - enclosed in `< ... >` (postfix) or `( ... )` (prefix), or a single prefix parameter. - - - - - F# syntax is SomeThing<'T> - - - - - F# syntax is 'typar: delegate<'Args, unit> - - - - - F# syntax is 'typar: enum<'UnderlyingType> - - - - - F# syntax is ^T: (static member MemberName: ^T * int -> ^T) - - - - - F# syntax is 'typar :> type - - - - - F# syntax is default ^T: type - - - - - F# syntax is 'typar: equality - - - - - F# syntax is 'typar: comparison - - - - - F# syntax is 'typar: null - - - - - F# syntax is 'typar: unmanaged - - - - - F# syntax: is 'typar: not struct - - - - - F# syntax: is 'typar: struct - - - - - The unchecked abstract syntax tree of F# type constraints - - - - - Represents the explicit declaration of a type parameter - - - - - A 'do' binding in a module. Must have type 'unit' - - - - - A normal 'let' binding in a module - - - - - A standalone expression in a module - - - - - The kind associated with a binding - "let", "do" or a standalone expression - - - - - Indicates if an expression is an atomic expression. - - An atomic expression has no whitespace unless enclosed in parentheses, e.g. - 1, "3", ident, ident.[expr] and (expr). If an atomic expression has type T, - then the largest expression ending at the same range as the atomic expression - also has type T. - - - - - Represents a record field name plus a flag indicating if given record field name is syntactically - correct and can be used in name resolution. - - - - - Represents the location of the separator block + optional position - of the semicolon (used for tooling support) - - - - - Indicates if a for loop is 'for x in e1 -> e2', only valid in sequence expressions - - - - - Indicates if a for loop is 'for x in e1 -> e2', only valid in sequence expressions - - - - - Represents whether a debug point should be present for a 'let' binding, - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'while' in a 'while...' loop, - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'in' or 'to' of a 'for...' loop, - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'for' in a 'for...' loop, - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'finally' in a 'try .. finally', - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'with' in a 'try .. with', - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for a 'try', that is whether - the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be suppressed for either the - first or second part of a sequential execution, that is whether the - construct corresponds to a debug point in the original source. - - - - - Represents a debug point at a leaf expression (e.g. an application or constant). - - - - - Represents whether a debug point should be present for the target - of a decision tree, that is whether the construct corresponds to a debug - point in the original source. - - - - - A construct marked or assumed 'private' - - - - - A construct marked or assumed 'internal' - - - - - A construct marked or assumed 'public' - - - - - Represents an accessibility modifier in F# syntax - - - - - Represents an unchecked syntax tree of F# unit of measure exponents. - - - - - A parenthesized measure - - - - - A variable unit of measure - - - - - An anonymous (inferred) unit of measure - - - - - The '1' unit of measure - - - - - A power of a unit of measure, e.g. 'kg ^ 2' - - - - - A division of two units of measure, e.g. 'kg / m' - - - - - A sequence of several units of measure, e.g. 'kg m m' - - - - - A product of two units of measure, e.g. 'kg * m' - - - - - A named unit of measure - - - - - Represents an unchecked syntax tree of F# unit of measure annotations. - - - - - Source Line, File, and Path Identifiers - Containing both the original value as the evaluated value. - - - - - Old comment: "we never iterate, so the const here is not another SynConst.Measure" - - - - - Used internally in the typechecker once an array of unit16 constants - is detected, to allow more efficient processing of large arrays of uint16 constants. - - - - - F# syntax: verbatim or regular byte string, e.g. "abc"B. - - Also used internally in the typechecker once an array of unit16 constants - is detected, to allow more efficient processing of large arrays of uint16 constants. - - - - - F# syntax: verbatim or regular string, e.g. "abc" - - - - - UserNum(value, suffix) - - F# syntax: 1Q, 1Z, 1R, 1N, 1G - - - - - F# syntax: 23.4M - - - - - F# syntax: 'a' - - - - - F# syntax: 1.30, 1.40e10 etc. - - - - - F# syntax: 1.30f, 1.40e10f etc. - - - - - F# syntax: 13un - - - - - F# syntax: 13n - - - - - F# syntax: 13UL - - - - - F# syntax: 13L - - - - - F# syntax: 13u, 0x4000u, 0o0777u - - - - - F# syntax: 13, 0x4000, 0o0777 - - - - - F# syntax: 13us, 0x4000us, 0o0777us, 0b0111101us - - - - - F# syntax: 13s, 0x4000s, 0o0777s, 0b0111101s - - - - - F# syntax: 13uy, 0x40uy, 0oFFuy, 0b0111101uy - - - - - F# syntax: 13y, 0xFFy, 0o077y, 0b0111101y - - - - - F# syntax: true, false - - - - - F# syntax: () - - - - - Gets the syntax range of this construct - - - - - The unchecked abstract syntax tree of constants in F# types and expressions. - - - - - Indicate if the byte string had a special format - - - - - Indicate if the string had a special format - - - - - Gets the syntax range of this construct - - - - - Represents a syntactic type parameter - - - - - The construct is a statically inferred type inference variable '^T' - - - - - The construct is a normal type inference variable - - - - - Represents whether a type parameter has a static requirement or not (^T or 'T) - - - - - The construct arises from error recovery - - - - - The construct arises normally - - - - - Indicates if the construct arises from error recovery - - - - - Get the trivia of the idents - - - - - Indicates if the construct ends in '.' due to error recovery - - - - - Gets the syntax range for part of this construct - - - - - Gets the syntax range of this construct - - - - - Get the long ident for this construct - - - - - Get the idents with potential trivia attached - - - - - Get the dot ranges - - - - - Represents a long identifier with possible '.' at end. - - Typically dotRanges.Length = lid.Length-1, but they may be same if (incomplete) code ends in a dot, e.g. "Foo.Bar." - The dots mostly matter for parsing, and are typically ignored by the typechecker, but - if dotRanges.Length = lid.Length, then the parser must have reported an error, so the typechecker is allowed - more freedom about typechecking these expressions. - LongIdent can be empty list - it is used to denote that name of some AST element is absent (i.e. empty type name in inherit) - - - - - Represents a long identifier e.g. 'A.B.C' - - - - - Represents an identifier with potentially additional trivia information. - - - - - Represents an identifier in F# code - - - - - Controls the behavior when a SynExpr is reached; it can just do - defaultTraverse(expr) if you have no special logic for this node, and want the default processing to pick which sub-node to dive deeper into - or can inject non-default behavior, which might incorporate: - traverseSynExpr(subExpr) to recurse deeper on some particular sub-expression based on your own logic - path helps to track AST nodes that were passed during traversal - - - - - Used to track route during traversal of syntax using SyntaxTraversal.Traverse - - - - - Keywords paired with their descriptions. Used in completion and quick info. - - - - - Indicates a ValRef generated to facilitate tuple eliminations - - - - - Mark some variables (the ones we introduce via abstractBigTargets) as don't-eliminate - - - - - The prefix of the names used for the fake namespace path added to all dynamic code entries in FSI.EXE - - - - - Reuses generated exception field name objects for common field numbers - - - - - Reuses generated union case field name objects for common field numbers - - - - - Mangle the static parameters for a provided type or method - - - - - Mangle the static parameters for a provided type or method - - - - - Try to chop "get_" or "set_" from a string. - If the string does not start with "get_" or "set_", this function raises an exception. - - - - - Try to chop "get_" or "set_" from a string - - - - - Is this character a part of a long identifier? - - - - - The characters that are allowed to be in an identifier. - - - - - The characters that are allowed to be the first character of an identifier. - - - - - Like ConvertValLogicalNameToDisplayName but produces a tagged layout - - - - - Like ConvertLogicalNameToDisplayName but produces a tagged layout - - - - - Take a core display name for a value (e.g. op_Addition or PropertyName) and convert it to display text - Foo --> Foo - + --> ``+`` - op_Addition --> (+) - op_Multiply --> ( * ) - op_DereferencePercent --> (!%) - A-B --> ``A-B`` - |A|_| --> (|A|_|) - let --> ``let`` - type --> ``type`` - params --> ``params`` - base --> base - or --> or - mod --> mod - - - - - Converts the logical name for and operator back into the core of a display name. For example: - Foo --> Foo - + --> + - op_Addition --> + - op_DereferencePercent --> !% - A-B --> A-B - |A|_| --> |A|_| - base --> base regardless of IsBaseVal - Used on names of all kinds - - TODO: We should assess uses of this function. - - In any cases it is used it probably indicates that text is being - generated which: - 1. does not contain double-backticks for non-identifiers - 2. does not put parentheses arounf operators or active pattern names - - If the text is immediately in quotes, this is generally ok, e.g. - - error FS0038: '+' is bound twice in this pattern - error FS0038: '|A|_|' is bound twice in this pattern - error FS0038: 'a a' is bound twice in this pattern - - If not, the it is likely this should be replaced by ConvertValLogicalNameToDisplayName. - - - - - Take a core display name (e.g. "List" or "Strange module name") and convert it to display text - by adding backticks if necessary. - Foo --> Foo - + --> ``+`` - A-B --> ``A-B`` - - - - - Converts the core of an operator name into a logical name. For example, - + --> op_Addition - !% --> op_DereferencePercent - Only used on actual operator names - - - - - Is the name a logical operator name, including unary, binary and ternary operators - op_UnaryPlus - yes - op_Addition - yes - op_Range - yes (?) - op_RangeStep - yes (?) - op_DynamicAssignment - yes - op_Quack - no - + - no - ABC - no - ABC DEF - no - base - no - |A|_| - no - - - - - Adds double backticks if necessary to make a valid identifier, e.g. - op_Addition --> op_Addition - + --> ``+`` (this is not op_Addition) - |>> --> ``|>>`` (this is not an op_) - A-B --> ``A-B`` - AB --> AB - |A|_| --> |A|_| this is an active pattern name, needs parens not backticks - Removes double backticks if not necessary to make a valid identifier, e.g. - ``A`` --> A - ``A-B`` --> ``A-B`` - - - - - Determines if the specified name is a valid name for an active pattern. - |A|_| --> true - |A|B| --> true - |A| --> true - | --> false - || --> false - op_Addition --> false - - TBD: needs unit testing - - - - - Is the name a valid F# identifier, primarily used internally in PrettyNaming.fs for determining if an - identifier needs backticks. - - In general do not use this routine. It is only used in one quick fix, for determining if it is valid - to add "_" in front of an identifier. - - A --> true - A' --> true - _A --> true - A0 --> true - |A|B| --> false - op_Addition --> true - + --> false - let --> false - base --> false - - TBD: needs unit testing - - - - - Returns `true` if given string is an operator display name, e.g. - ( |>> ) - |>> - .. - - - - - Prefix for compiled (mangled) operator names. - - - - - Some general F# utilities for mangling / unmangling / manipulating names. - Anything to do with special names of identifiers and other lexical rules - - - - - A kind that determines what range in a source's text is semantically classified as after type-checking. - - - - - A builder that will build an semantic classification key store based on the written Item and its associated range. - - - - - Get a read only view on the semantic classification key store - - - - - Stores a list of semantic classification key strings and their ranges in a memory mapped file. - Provides a view to iterate over the contents of the file. - - - - - Iterate through the stored SemanticClassificationItem entries from the store and apply the passed function on each entry. - - - - - Provides a read only view to iterate over the semantic classification contents. - - - - - The methods (or other items) in the group - - - - - The shared name of the methods (or other items) in the group - - - - - Represents a group of methods (or other items) returned by GetMethods. - - - - - The documentation for the item - - - - - Does the type name or method support a static arguments list, like TP<42,"foo"> or conn.CreateCommand<42, "foo">(arg1, arg2)? - - - - - The tagged text for the return type for the method (or other item) - - - - - The parameters of the method in the overload set - - - - - Does the method support an arguments list? This is always true except for static type instantiations like TP<42,"foo">. - - - - - Does the method support a params list arg? - - - - - The description representation for the method (or other item) - - - - - Represents one method (or other item) in a method group. The item may represent either a method or - a single, non-overloaded item such as union case or a named function value. - - - - - The name of the parameter. - - - - - Is the parameter optional - - - - - The representation for the parameter including its name, its type and visual indicators of other - information such as whether it is optional. - - - - - A key that can be used for sorting the parameters, used to help sort overloads. - - - - - Represents one parameter for one method (or other item) in a group. - - - - - Represents a set of declarations in F# source code, with information attached ready for display by an editor. - Returned by GetDeclarations. - - - - - Get the text to display in the declaration list for the declaration. - - This is a display name without backticks. - - - - - Get the text for the declaration as it's to be inserted into source code. - - This is a display name with backticks if necessary. - - - - - Get the text to display in the declaration list for the declaration. - - This is a display name without backticks. - - - - - Get the completion kind of the item - - - - - Get the glyph to use - - - - - Get the description - - - - - Get the accessibility of the item - - - - - Represents a declaration in F# source code, with information attached ready for display by an editor. - Returned by GetDeclarations. - - - - - A list of data tip elements to display. - - - - - Information for building a tool tip box. - - - - - An error occurred formatting this element - - - - - A single type, method, etc with comment. May represent a method overload group. - - - - - A single tool tip display element - - - - - Parameter name - - - - - Extra text, goes at the end - - - - - typar instantiation text, to go after xml - - - - - A single data tip display element - - - - - The kind of container. - - - - - The name of the container or file - - - - - The fully qualified name of the container. - For files it returns empty string. - - - - - 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. - - - - - Represents top-level declarations (that should be in the type drop-down) - with nested declarations (that can be shown in the member drop-down) - - - - - Represents an item to be displayed in the navigation bar - - - - - Indicates a kind of item to show in an F# navigation bar - - - - - The locations of commas and close parenthesis (or, last char of last arg, if no final close parenthesis) - - - - - The location of the open-parentheses - - - - - Either empty or a name if an actual named parameter; f(0,a=4,?b=None) would be [|None; Some "a"; Some "b"|] - - - - - The start location of long identifier prior to the open-parentheses - - - - - The end location of long identifier prior to the open-parentheses - - - - - The text of the long identifier prior to the open-parentheses - - - - - Is false if either this is a call without parens "f x" or the parser recovered as in "f(x,y" - - - - - Array of locations for each argument, and a flag if that argument is named - - - - - Find the information about parameter info locations at a particular source location - - - - - Represents the locations relevant to activating parameter info in an IDE - - - - - Represents the location of a tupled argument, which can optionally be a named argument. - - - - - Last part of the entity's full name. - - - - - Full display name (i.e. last ident plus modules with `RequireQualifiedAccess` attribute prefixed). - - - - - Namespace that is needed to open to make the entity resolvable in the current scope. - - - - - Ident parts needed to append to the current ident to make it resolvable in current scope. - - - - - Full name, relative to the current scope. - - - - - Helper data structure representing a symbol, suitable for implementing unresolved identifiers resolution code fixes. - - - - - `ShortIdent` with a flag indicating if it's resolved in some scope. - - - - - An array of `ShortIdent`. - - - - - Short identifier, i.e. an identifier that contains no dots. - - - - - Where open statements should be added. - - - - - Current position (F# compiler line number). - - - - - Current scope kind. - - - - - Insert open namespace context. - - - - - Kind of lexical scope. - - - - - Completing a method override (e.g. override this.ToStr|) - - - - - Completing a pattern in a match clause, member/let binding or lambda - - - - - Completing a type abbreviation (e.g. type Long = int6|) - or a single case union without a bar (type SomeUnion = Abc|) - - - - - Completing union case fields declaration (e.g. 'A of stri|' but not 'B of tex|: string') - - - - - Completing a type annotation (e.g. foo (x: |)) - Completing a type application (e.g. typeof<str| >) - - - - - Completing an attribute name, outside of the constructor - - - - - Completing named parameters\setters in parameter list of attributes\constructor\method calls - end of name ast node * list of properties\parameters that were already set - - - - - Completing records field - - - - - Completing something after the inherit keyword - - - - - Completion context cannot be determined due to errors - - - - - Any other position in a pattern that does not need special handling - - - - - Completing a record field identifier in a pattern (e.g. fun { Field1 = a; Fie| } -> ) - - - - - Completing union case field identifier in a pattern (e.g. fun (Case (field1 = a; fie| )) -> ) - - - - - Completing union case field pattern (e.g. fun (Some (Value = v| )) -> ) - - - - Completing union case field pattern (e.g. fun (Some v| ) -> ) or fun (Some (v| )) -> ). In theory, this could also be parameterized active pattern usage. - Position in the tuple. None if there is no tuple, with only one field outside of parentheses - `Some v|` - True when completing the first field in the tuple and no other field is bound - `Case (a|)` but not `Case (a|, b)` - Range of the case identifier - - - - Performs an operation on the cache in thread safe manner. - - - - - Clears the cache. - - - - - Thread safe wrapper over `IAssemblyContentCache`. - - - - - Try get an assembly cached content. - - - - - Store an assembly content. - - - - - Assembly content cache. - - - - - Assembly content. - - - - - Content type used to get assembly content. - - - - - Assembly file last write time. - - - - - `RawEntity` list retrieved from an assembly. - - - - - Cache display name and namespace, used for completion. - - - - - Function that returns `EntityKind` based of given `LookupKind`. - - - - - Parent module that has `AutoOpen` attribute. - - - - - Parent module that has the largest scope and has `RequireQualifiedAccess` attribute. - - - - - The most narrative parent module that has `RequireQualifiedAccess` attribute. - - - - - `FSharpEntity.Namespace`. - - - - - Entity name parts with removed module suffixes (Ns.M1Module.M2Module.M3.entity -> Ns.M1.M2.M3.entity) - and replaced compiled names with display names (FSharpEntity.DisplayName, FSharpValueOrFunction.DisplayName). - Note: *all* parts are cleaned, not the last one. - - - - - Full entity name as it's seen in compiled code (raw FSharpEntity.FullName, FSharpValueOrFunction.FullName). - - - - - Represents type, module, member, function or value in a compiled assembly. - - - - - Assembly path. - - - - - Entity lookup type. - - - - - All assembly content. - - - - - Public assembly content only. - - - - - Assembly content type. - - - - - Represent an Xml documentation block in source code - - - - - Indicates an external declaration was found - - - - - Indicates a declaration location was found - - - - - Indicates a declaration location was not found, with an additional reason - - - - - Represents the result of the GetDeclarationLocation operation. - - - - - Trying to find declaration of ProvidedMember without TypeProviderDefinitionLocationAttribute - - - - - Trying to find declaration of ProvidedType without TypeProviderDefinitionLocationAttribute - - - - - Source code file is not available - - - - - Generic reason: no particular information about error apart from a message - - - - - Represents the reason why the GetDeclarationLocation operation failed. - - - - - Represents a symbol in an external (non F#) assembly - - - - - Represents the type of a single method parameter - - - - - Type variable defined in non-F# assembly. - - - - - Pointer defined in non-F# assembly. - - - - - Array of type that is defined in non-F# assembly. - - - - - Type defined in non-F# assembly. - - - - - Represents a type in an external (non F#) assembly. - - - - - Position of the last dot. - - - - - The column number at the end of full partial name. - - - - - Last part of long ident. - - - - - Qualifying idents, prior to the last dot, not including the last part. - - - - - Empty partial long name. - - - - - Qualified long name. - - - - - Capture information about an interface in ASTs - - - - - Extension methods for the TcResolutions type. - - - - - Corrects insertion line number based on kind of scope and text surrounding the insertion point. - - - - - Returns long identifier at position. - - - - - Returns `InsertContext` based on current position and symbol idents. - - - - - Returns `InsertContext` based on current position and symbol idents. - - - - - A pattern that collects all sequential expressions to avoid StackOverflowException - - - - - Operations querying the entire syntax tree - - - - - Returns (possibly cached) assembly content. - - - - - Given a `FSharpAssemblySignature`, returns assembly content. - - - - - Provides assembly content. - - - - - Get the list of Xml documentation from current source code - - - - - if it's a blank XML comment with trailing "<", returns Some (index of the "<"), otherwise returns None - - - - - Tests whether the user is typing something like "member x." or "override (*comment*) x." - - - - - Get the partial long name of the identifier to the left of index. - For example, for `System.DateTime.Now` it returns PartialLongName ([|"System"; "DateTime"|], "Now", Some 32), where "32" pos of the last dot. - - - - - Get the partial long name of the identifier to the left of index. - - - - - Given a string and a position in that string, find an identifier as - expected by `GotoDefinition`. This will work when the cursor is - immediately before the identifier, within the identifier, or immediately - after the identifier. - - 'tolerateJustAfter' indicates that we tolerate being one character after the identifier, used - for goto-definition - - In general, only identifiers composed from upper/lower letters and '.' are supported, but there - are a couple of explicitly handled exceptions to allow some common scenarios: - - When the name contains only letters and '|' symbol, it may be an active pattern, so we - treat it as a valid identifier - e.g. let ( |Identity| ) a = a - (but other identifiers that include '|' are not allowed - e.g. '||' operator) - - It searches for double tick (``) to see if the identifier could be something like ``a b`` - - REVIEW: Also support, e.g., operators, performing the necessary mangling. - (i.e., I would like that the name returned here can be passed as-is - (post `.`-chopping) to `GetDeclarationLocation.) - - In addition, return the position where a `.` would go if we were making - a call to `DeclItemsForNamesAtPosition` for intellisense. This will - allow us to use find the correct qualified items rather than resorting - to the more expensive and less accurate environment lookup. - - - - - Puts us after the last character. - - - - - Methods for cheaply and inaccurately parsing F#. - - These methods are very old and are mostly to do with extracting "long identifier islands" - A.B.C - from F# source code, an approach taken from pre-F# VS samples for implementing intelliense. - - This code should really no longer be needed since the language service has access to - parsed F# source code ASTs. However, the long identifiers are still passed back to GetDeclarations and friends in the - F# Compiler Service and it's annoyingly hard to remove their use completely. - - In general it is unlikely much progress will be made by fixing this code - it will be better to - extract more information from the F# ASTs. - - It's also surprising how hard even the job of getting long identifier islands can be. For example the code - below is inaccurate for long identifier chains involving ``...`` identifiers. And there are special cases - for active pattern names and so on. - - - - - Find corresponding interface declaration at a given position - - - - - Generate stub implementation of an interface at a start column - - - - - Check whether an entity is an interface or type abbreviation of an interface - - - - - Get interface member signatures - - - - - Get associated member names and ranges. - In case of properties, intrinsic ranges might not be correct for the purpose of getting - positions of 'member', which indicate the indentation for generating new members - - - - - Check whether an interface is empty - - - - - Get members in the decreasing order of inheritance chain - - - - - TextSpan in BlockSpan - - - - - HintSpan in BlockSpan - - - - - Stores the range for a construct, the sub-range that should be collapsed for outlinging, - a tag for the construct type, and a tag for the collapse style - - - - - Tag to identify the construct that can be stored alongside its associated ranges - - - - - Collapse indicates the way a range/snapshot should be collapsed. `Same` is for a scope inside - some kind of scope delimiter, e.g. `[| ... |]`, `[ ... ]`, `{ ... }`, etc. `Below` is for expressions - following a binding or the right hand side of a pattern, e.g. `let x = ...` - - - - - Returns outlining ranges for given parsed input. - - - - - Get all unused declarations in a file - - - - - The relative name that can be applied to a simplifiable name - - - - - The range of a name that can be simplified - - - - - Data for use in finding unnecessarily-qualified names and generating diagnostics to simplify them - - - - - Get all ranges that can be simplified in a file - - - - - Get all unused open declarations in a file - - - - - Defines a write-only stream used to capture output of the hosted F# Interactive dynamic compiler. - - - - - Feeds content into the stream. - - - - - Defines a read-only input stream used to feed content to the hosted F# Interactive dynamic compiler. - - - - - Event fires when a root-level value is bound to an identifier, e.g., via `let x = ...`. - - - - - Raised when an interaction is successfully typechecked and executed, resulting in an update to the - type checking state. - - This event is triggered after parsing and checking, either via input from 'stdin', or via a call to EvalInteraction. - - - - - A host calls this to get the active language ID if provided by fsi-server-lcid - - - - - A host calls this to determine if the --gui parameter is active - - - - - The single, global interactive checker to use in conjunction with other operations - on the FsiEvaluationSession. - - If you are using an FsiEvaluationSession in this process, you should only use this InteractiveChecker - for additional checking operations. - - - - - Get all the dynamically generated assemblies - - - - - Get a handle to the resolved view of the current signature of the incrementally generated assembly. - - - - - Tries to find a root-level value that is bound to the given identifier - - - - - Load the dummy interaction, load the initial files, and, - if interacting, start the background thread to read the standard input. - - Performs these steps: - - Load the dummy interaction, if any - - Set up exception handling, if any - - Load the initial files, if any - - Start the background thread to read the standard input, if any - - Sit in the GUI event loop indefinitely, if needed - - - - - A host calls this to report an unhandled exception in a standard way, e.g. an exception on the GUI thread gets printed to stderr - - - - - Typecheck the given script fragment in the type checking context implied by the current state - of F# Interactive. The results can be used to access intellisense, perform resolutions, - check brace matching and other information. - - Operations may be run concurrently with other requests to the InteractiveChecker. - - - - - A host calls this to request an interrupt on the evaluation thread. - - - - - Get a configuration that uses a private inbuilt implementation of the 'fsi' object and does not - implicitly reference FSharp.Compiler.Interactive.Settings.dll. - - - - - Get a configuration that uses the 'fsi' object (normally from FSharp.Compiler.Interactive.Settings.dll, - an object from another DLL with identical characteristics) to provide an implementation of the configuration. - FSharp.Compiler.Interactive.Settings.dll is referenced by default. - - - - - Get a configuration that uses the 'fsi' object (normally from FSharp.Compiler.Interactive.Settings.dll, - an object from another DLL with identical characteristics) to provide an implementation of the configuration. - The flag indicates if FSharp.Compiler.Interactive.Settings.dll is referenced by default. - - - - - A host calls this to get the completions for a long identifier, e.g. in the console - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Gets the root-level values that are bound to an identifier - - - - - Format a value to a string using the current PrintDepth, PrintLength etc settings provided by the active fsi configuration object - - - - - Execute the given script. Stop on first error, discarding the rest - of the script. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the given script. Stop on first error, discarding the rest - of the script. Errors are sent to the output writer, a 'true' return value indicates there - were no errors overall. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - The scriptFileName parameter is used to report errors including this file name. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors are sent to the output writer, a 'true' return value indicates there - were no errors overall. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - The scriptFileName parameter is used to report errors including this file name. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors are sent to the output writer, a 'true' return value indicates there - were no errors overall. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Parsing is performed on the current thread, and execution is performed - synchronously on the 'main' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - The scriptFileName parameter is used to report errors including this file name. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Parsing is performed on the current thread, and execution is performed - synchronously on the 'main' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors are sent to the output writer. Parsing is performed on the current thread, and execution is performed - synchronously on the 'main' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - The scriptFileName parameter is used to report errors including this file name. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors are sent to the output writer. Parsing is performed on the current thread, and execution is performed - synchronously on the 'main' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - Create an FsiEvaluationSession, reading from the given text input, writing to the given text output and error writers - - The dynamic configuration of the evaluation session - The command line arguments for the evaluation session - Read input from the given reader - Write errors to the given writer - Write output to the given writer - Optionally make the dynamic assembly for the session collectible - An optional resolver for legacy MSBuild references - - - - Creates a root-level value with the given name and .NET object. - If the .NET object contains types from assemblies that are not referenced in the interactive session, it will try to implicitly resolve them by default configuration. - Name must be a valid identifier. - - - - - Represents an F# Interactive evaluation session. - - - - - Thrown when there was an error compiling the given code in FSI. - - - - - Implicitly reference FSharp.Compiler.Interactive.Settings.dll - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Hook for listening for evaluation bindings - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - The evaluation session calls this at an appropriate point in the startup phase if the --fsi-server parameter was given - - - - - The evaluation session calls this to report the preferred view of the command line arguments after - stripping things like "/use:file.fsx", "-r:Foo.dll" etc. - - - - - Indicate a special console "readline" reader for the evaluation session, if any.  - - A "console" gets used if --readline is specified (the default on Windows + .NET); and --fsi-server is not - given (always combine with --readline-), and OptionalConsoleReadLine is given. - When a console is used, special rules apply to "peekahead", which allows early typing on the console. - Peekahead happens if --peekahead- is not specified (the default). - In this case, a prompt is printed early, a background thread is created and - the OptionalConsoleReadLine is used to read the first line. - If a console is not used, then inReader.Peek() is called early instead. -   - - Further lines are read using OptionalConsoleReadLine(). - If not provided, lines are read using inReader.ReadLine(). -   - - - - - Schedule a restart for the event loop. - - - - - Called by the evaluation session to ask the host to enter a dispatch loop like Application.Run(). - Only called if --gui option is used (which is the default). - Gets called towards the end of startup and every time a ThreadAbort escaped to the backup driver loop. - Return true if a 'restart' is required, which is a bit meaningless. - - - - - Request that the given operation be run synchronously on the event loop. - - - - - The FSharpSymbolUse for the symbol defined - - - - - The symbol defined - - - - - The display name of the symbol defined - - - - - The details of the expression defined - - - - - The value of the symbol defined, if any - - - - - The evaluated F# value - - - - - The identifier of the value - - - - - Represents an evaluated F# value that is bound to an identifier - - - - - The value, as an object - - - - - The type of the value, from the point of view of the .NET type system - - - - - The type of the value, from the point of view of the F# type system - - - - - Represents an evaluated F# value - - - - When set to 'false', disables the display of properties of evaluated objects in the output of the interactive session. - - - When set to 'false', disables the display of sequences in the output of the interactive session. - - - When set to 'false', disables the display of declaration values in the output of the interactive session. - - - Get or set the print width of the interactive session. - - - Get or set the total print size of the interactive session. - - - Get or set the total print length of the interactive session. - - - Get or set the print depth of the interactive session. - - - Get or set the format provider used in the output of the interactive session. - - - Get or set the floating point format used in the output of the interactive session. - - - Gets or sets a the current event loop being used to process interactions. - - - 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. - - - When set to 'false', disables the display of properties of evaluated objects in the output of the interactive session. - - - When set to 'false', disables the display of sequences in the output of the interactive session. - - - When set to 'false', disables the display of declaration values in the output of the interactive session. - - - Get or set the print width of the interactive session. - - - Get or set the total print size of the interactive session. - - - Get or set the total print length of the interactive session. - - - Get or set the print depth of the interactive session. - - - Get or set the format provider used in the output of the interactive session. - - - Get or set the floating point format used in the output of the interactive session. - - - Gets or sets a the current event loop being used to process interactions. - - - 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. - - - Register a printer that controls the output of the interactive session. - - - Register a print transformer that controls the output of the interactive session. - - - - Operations supported by the currently executing F# Interactive session. - - - - Schedule a restart for the event loop. - - - Run the event loop. - True if the event loop was restarted; false otherwise. - - - Request that the given operation be run synchronously on the event loop. - The result of the operation. - - - An event loop used by the currently executing F# Interactive session to execute code - in the context of a GUI or another event-based system. - - - - A default implementation of the 'fsi' object, used by GetDefaultConfiguration(). Note this - is a different object to FSharp.Compiler.Interactive.Settings.fsi in FSharp.Compiler.Interactive.Settings.dll, - which can be used as an alternative implementation of the interactive settings if passed as a parameter - to GetDefaultConfiguration(fsiObj). - - - - - A default implementation of the 'fsi' object, used by GetDefaultConfiguration() - - - - - Parses and checks the whole project, good for compilers (Fable etc.) - Does not retain name resolutions and symbol uses which are quite memory hungry (so no intellisense etc.). - Already parsed files will be cached so subsequent compilations will be faster. - - - - - Parses and checks file in project, will compile and cache all the files up to this one - (if not already done before), or fetch them from cache. Returns partial project results, - up to and including the file requested. Returns parse and typecheck results containing - name resolutions and symbol uses for the file requested only, so intellisense etc. works. - - - - - Find the transitive dependent files of the current file based on the untyped syntax tree. - - - - - Compile project to file. If project has already been type checked, - check results will be taken from the cache. - - - - - Clears parse and typecheck caches. - - - - - Errors grouped by file, sorted by line, column - - - - - Get the Reference Assemblies directory for the .NET Framework (on Windows) - This is added to the default resolution path for - design-time compilations. - - - - - Perform assembly resolution on the given references under the given conditions - - - - - Get the "v4.5.1"-style moniker for the highest installed .NET Framework version. - This is the value passed back to Resolve if no explicit "mscorlib" has been given. - - Note: If an explicit "mscorlib" is given, then --noframework is being used, and the whole ReferenceResolver logic is essentially - unused. However in the future an option may be added to allow an explicit specification of - a .NET Framework version to use for scripts. - - - - - Round-tripped baggage - - - - - Prepare textual information about where the assembly was resolved from, used for tooltip output - - - - - Item specification. - - - - - Indicates a script or source being dynamically compiled and executed. Uses implementation assemblies. - - - - - Indicates a script or source being edited or compiled. Uses reference assemblies (not implementation assemblies). - - - - - A builder that will build an item key store based on the written Item and its associated range. - - - - - Stores a list of item key strings and their ranges in a memory mapped file. - - - - - The timestamp of the source. - - - - - The file path of the source. - - - - - Gets the internal text container. Text may be on-disk, in a stream, or a source text. - - - - - Creates a FSharpSource from disk. Only used internally. - - - - - Creates a FSharpSource from the specified file path by shadow-copying the file. - - - - - Creates a FSharpSource. - - - - - The storage container for a F# source item that could either be on-disk or in-memory. - TODO: Make this public. - - - - - The TcConfig passed in to the builder creation. - - - - - The full set of source files including those from options - - - - - Raised just after the whole project has finished type checking. At this point, accessing the - overall analysis results for the project will be quick. - - - - - Check if one of the build's references is invalidated. - - - - - Raised when the build is invalidated. - - - - - Raised just after a file is parsed - - - - - Raised just after a file is checked - - - - - Raised just before a file is type-checked, to invalidate the state of the file in VS and force VS to request a new direct typecheck of the file. - The incremental builder also typechecks the file (error and intellisense results from the background builder are not - used by VS). - - - - - The list of files the build depends on - - - - - Get the preceding typecheck state of a slot, WITH checking if it is up-to-date w.r.t. the timestamps of files and referenced DLLs prior to this one. - However, files will not be parsed or checked. - Return None if the result is not available or if it is not up-to-date. - - This is safe for use from non-compiler threads but the objects returned must in many cases be accessed only from the compiler thread. - - - - - Create the incremental builder - - - - - The project build. Return true if the background work is finished. - - - - - Await the untyped parse results for a particular slot in the vector of parse results. - - This may be a marginally long-running operation (parses are relatively quick, only one file needs to be parsed) - - - - - Get the logical time stamp that is associated with the output of the project if it were fully built immediately - - - - - Get the preceding typecheck state of a slot. Compute the entire type check of the project up - to the necessary point if the result is not available. This may be a long-running operation. - This will get full type-check info for the file, meaning no partial type-checking. - - - - - Get the final typecheck result. If 'generateTypedImplFiles' was set on Create then the CheckedAssemblyAfterOptimization will contain implementations. - This may be a long-running operation. - This will get full type-check info for the project, meaning no partial type-checking. - - - - - Get the typecheck state after checking a file. Compute the entire type check of the project up - to the necessary point if the result is not available. This may be a long-running operation. - This will get full type-check info for the file, meaning no partial type-checking. - - - - - Get the typecheck state of a slot, without checking if it is up-to-date w.r.t. - the timestamps on files and referenced DLLs prior to this one. Return None if the result is not available. - This is a very quick operation. - - This is safe for use from non-compiler threads but the objects returned must in many cases be accessed only from the compiler thread. - - - - - Get the preceding typecheck state of a slot, without checking if it is up-to-date w.r.t. - the timestamps on files and referenced DLLs prior to this one. Return None if the result is not available. - This is a very quick operation. - - This is safe for use from non-compiler threads but the objects returned must in many cases be accessed only from the compiler thread. - - - - - Get the preceding typecheck state of a slot. Compute the entire type check of the project up - to the necessary point if the result is not available. This may be a long-running operation. - - - - - Get the final typecheck result. If 'generateTypedImplFiles' was set on Create then the CheckedAssemblyAfterOptimization will contain implementations. - This may be a long-running operation. - - - - - Get the typecheck result after the end of the last file. The typecheck of the project is not 'completed'. - This may be a long-running operation. - - - - - Get the typecheck state after checking a file. Compute the entire type check of the project up - to the necessary point if the result is not available. This may be a long-running operation. - - - - - Does the given file exist in the builder's pipeline? - - - - - Get the preceding typecheck state of a slot, but only if it is up-to-date w.r.t. - the timestamps on files and referenced DLLs prior to this one. Return None if the result is not available. - This is a relatively quick operation. - - This is safe for use from non-compiler threads - - - - - Manages an incremental build graph for the build of an F# project - - - - - Compute both the "TcInfo" and "TcInfoExtras" parts of the results. - Can cause a second type-check if `enablePartialTypeChecking` is true in the checker. - Only use when it's absolutely necessary to get rich information on a file. - - - - - Compute the "TcInfo" part of the results. If `enablePartialTypeChecking` is false then - extras will also be available. - - - - - Can cause a second type-check if `enablePartialTypeChecking` is true in the checker. - Only use when it's absolutely necessary to get rich information on a file. - - Will return 'None' for enableBackgroundItemKeyStoreAndSemanticClassification=false. - - - - - Compute the "ItemKeyStore" parts of the results. - Can cause a second type-check if `enablePartialTypeChecking` is true in the checker. - Only use when it's absolutely necessary to get rich information on a file. - - Will return 'None' for enableBackgroundItemKeyStoreAndSemanticClassification=false. - - - - - Represents the state in the incremental graph associated with checking a file - - - - - If enabled, holds semantic classification information for Item(symbol)s in a file. - - - - - If enabled, stores a linear list of ranges and strings that identify an Item(symbol) in a file. Used for background find all references. - - - - - Result of checking most recent file, if any - - - - - Accumulated results of type checking. Optional data that isn't needed to type-check a file, but needed for more information for in tooling. - - - - - Accumulated errors, last file first - - - - - Disambiguation table for module names - - - - - Accumulated diagnostics - - - - - Accumulated results of type checking. The minimum amount of state in order to continue type-checking following files. - - - - - Lookup the global static cache for building the FrameworkTcImports - - - - - The syntax tree resulting from the parse - - - - - Indicates if any errors occurred during the parse - - - - - Name of the file for which this information were created - - - - - Get the errors and warnings for the parse - - - - - When these files change then the build is invalid - - - - - Return the inner-most range associated with a possible breakpoint location - - - - - Attempts to find the range of the string interpolation that contains a given position. - - - - - Gets the range of where a return type hint could be placed for a function binding. This will be right in front of the equals sign. - Returns None if type annotation is present. - - - - - Given the position of an expression, attempts to find the range of the - '!' in a derefence operation of that expression, like: - '!expr', '!(expr)', etc. - - - - - Attempts to find the range of a record expression containing the given position. - - - - - Attempts to find the range of an attempted lambda expression or pattern, the argument range, and the expr range when writing a C#-style "lambda" (which is actually an operator application) - - - - - Attempts to find the range of the name of the nearest outer binding that contains a given position. - - - - - Attempts to find the range of a function or method that is being applied. Also accounts for functions in pipelines. - - - - - Gets the range of an expression being dereferenced. For `!expr`, gives the range of `expr` - - - - - Attempts to find the range of an expression `expr` contained in a `yield expr` or `return expr` expression (and bang-variants). - - - - - Attempts to find an Ident of a pipeline containing the given position, and the number of args already applied in that pipeline. - For example, '[1..10] |> List.map ' would give back the ident of '|>' and 1, because it applied 1 arg (the list) to 'List.map'. - - - - - Determines if the range points to a type name in the type definition. - - - - - Determines if the expression or pattern at the given position has a type annotation - - - - - Determines if the given position is bound to a type definition - - - - - Determines if the given position is bound to a record definition - - - - - Determines if the given position is contained within a curried parameter in a binding. - - - - - Determines if the given position is inside a function or method application. - - - - - Determines if the binding at the given position is bound to a lambda expression - - - - - Get declared items and the selected item at the specified location - - - - - Gets the ranges of all arguments, if they can be found, for a function application at the given position. - - - - - Notable parse info for ParameterInfo at a given location - - - - - Represents the results of parsing an F# file and a set of analysis operations based on the parse tree alone. - - - - - Get the resolution of the ProjectOptions - - - - - Indicates if critical errors existed in the project options - - - - - The errors returned by processing the project - - - - - Indicates the set of files which must be watched to accurately track changes that affect these results, - Clients interested in reacting to updates to these files should watch these files and take actions as described - in the documentation for compiler service. - - - - - Get a view of the overall signature of the assembly. Only valid to use if HasCriticalErrors is false. - - - - - Get a view of the overall contents of the assembly. Only valid to use if HasCriticalErrors is false. - - - - - Get the textual usages that resolved to the given symbol throughout the project - - - - - Get an optimized view of the overall contents of the assembly. Only valid to use if HasCriticalErrors is false. - - - - - Get all textual usages of all symbols throughout the project - - - - - A handle to the results of CheckFileInProject. - - - - - Success - - - - - Aborted because cancellation caused an abandonment of the operation - - - - - The result of calling TypeCheckResult including the possibility of abort and background compiler not caught up. - - - - - Get the resolution of the ProjectOptions - - - - - Get a view of the contents of the assembly up to and including the file just checked - - - - - Open declarations in the file, including auto open modules. - - - - - Represents complete typechecked implementation file, including its typechecked signatures if any. - - - - - Indicates whether type checking successfully occurred with some results returned. If false, indicates that - an unrecoverable error in earlier checking/parsing/resolution steps. - - - - - The errors returned by parsing a source file. - - - - - Indicates the set of files which must be watched to accurately track changes that affect these results, - Clients interested in reacting to updates to these files should watch these files and take actions as described - in the documentation for compiler service. - - - - - Tries to get the current successful TcImports. This is only used in testing. Do not use it for other stuff. - - - - - Internal constructor - - - - - Internal constructor - - - - - Determines if a long ident is resolvable at a specific point. - - - - - Determines if a long ident is resolvable at a specific point. - - - - - Get the textual usages that resolved to the given symbol throughout the file - - - - Compute a formatted tooltip for the given location - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - Used to discriminate between 'identifiers', 'strings' and others. For strings, an attempt is made to give a tooltip for a #r "..." location. Use a value from FSharpTokenInfo.Tag, or FSharpTokenTag.Identifier, unless you have other information available. - The optional width that the layout gets squashed to. - - - Similar to GetSymbolUseAtLocation, but returns all found symbols if there are multiple. - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - Resolve the names at the given location to a use of symbol. - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - Get any extra colorization info that is available after the typecheck - - - Compute a set of method overloads to show in a dialog relevant to the given code location. The resulting method overloads are returned as symbols. - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - Compute a set of method overloads to show in a dialog relevant to the given code location. - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - Compute a formatted tooltip for the given keywords - - The keywords at the location where the information is being requested. - - - Get the locations of and number of arguments associated with format specifiers - - - Get the locations of format specifiers - - - Compute the Visual Studio F1-help key identifier for the given location, based on name resolution results - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - - Find the most precise display environment for the given line and column. - - - - Compute a formatted tooltip for the given symbol at position - - The symbol. - Generic arguments. - Display the symbol full name. - The position. - - - Resolve the names at the given location to the declaration location of the corresponding construct. - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - If not given, then get the location of the symbol. If false, then prefer the location of the corresponding symbol in the implementation of the file (rather than the signature if present). If true, prefer the location of the corresponding symbol in the signature of the file (rather than the implementation). - - - Get the items for a declaration list in FSharpSymbol format - - - If this is present, it is used to filter declarations based on location in the - parse tree, specifically at 'open' declarations, 'inherit' of class or interface - 'record field' locations and r.h.s. of 'range' operator a..b - - The line number where the completion is happening - - Partial long name. QuickParse.GetPartialLongNameEx can be used to get it. - - - The text of the line where the completion is happening. This is only used to make a couple - of adhoc corrections to completion accuracy (e.g. checking for "..") - - - Function that returns all entities from current and referenced assemblies. - - - - Get the items for a declaration list - - - If this is present, it is used to filter declarations based on location in the - parse tree, specifically at 'open' declarations, 'inherit' of class or interface - 'record field' locations and r.h.s. of 'range' operator a..b - - The line number where the completion is happening - - Partial long name. QuickParse.GetPartialLongNameEx can be used to get it. - - - The text of the line where the completion is happening. This is only used to make a couple - of adhoc corrections to completion accuracy (e.g. checking for "..") - - - Function that returns all entities from current and referenced assemblies. - - - Completion context for a particular position computed in advance. - - - - - Get all textual usages of all symbols throughout the file - - - - - Lays out and returns the formatted signature for the typechecked file as source text. - - - - - Internal constructor - check a file and collect errors - - - - - A handle to the results of CheckFileInProject. - - - - - Indicates if the ranges returned by parsing should have '#line' directives applied to them. - When compiling code, this should usually be 'true'. For editing tools, this is usually 'false. - The default for FSharpParsingOptions.ApplyLineDirectives is 'false'. The default for - FSharpParsingOptions arising from FSharpProjectOptions will be 'true' unless '--ignorelinedirectives' is used in the - parameters from which these are derived. - - - - - Options used to determine active --define conditionals and other options relevant to parsing files in a project - - - - - Get the project options - - - - - Get the accessibility rights for this project context w.r.t. InternalsVisibleTo attributes granting access to other assemblies - - - - - Get the resolution and full contents of the assemblies referenced by the project options - - - - - Represents the checking context implied by the ProjectOptions - - - - - The symbol referenced - - - - - The range of text representing the reference to the symbol - - - - - Indicates if the FSharpSymbolUse is private to the implementation & signature file. - This is true for function and method parameters. - - - - - Indicates if the FSharpSymbolUse is declared as private - - - - - Indicates if the reference is used for example at a call site - - - - - Indicates if the reference is in a syntactic type - - - - - Indicates if the reference is in a pattern - - - - - Indicates if the reference is in open statement - - - - - Indicates if the reference is via the member being implemented in a class or object expression - - - - - Indicates if the reference is a definition for the symbol, either in a signature or implementation - - - - - Indicates if the reference is either a builder or a custom operation in a computation expression - - - - - Indicates if the reference is in an attribute - - - - - The file name the reference occurs in - - - - - The display context active at the point where the symbol is used. Can be passed to FSharpType.Format - and other methods to format items in a way that is suitable for a specific source code location. - - - - - Represents the use of an F# symbol from F# source code - - - - - A reference from an ILModuleReader. - - The fully qualified path to the output of the referenced project. This should be the same value as the -r reference in the project options for this referenced project. - A function that calculates a last-modified timestamp for this reference. This will be used to determine if the reference is up-to-date. - A function that creates an ILModuleReader for reading module data. - - - - A reference for any portable executable, including F#. The stream is owned by this reference. - The stream will be automatically disposed when there are no references to FSharpReferencedProject and is GC collected. - Once the stream is evaluated, the function that constructs the stream will no longer be referenced by anything. - If the stream evaluation throws an exception, it will be automatically handled. - - A function that calculates a last-modified timestamp for this reference. This will be used to determine if the reference is up-to-date. - A function that opens a Portable Executable data stream for reading. - - - - A reference for an F# project. The physical data for it is stored/cached inside of the compiler service. - - The fully qualified path to the output of the referenced project. This should be the same value as the -r reference in the project options for this referenced project. - The Project Options for this F# project - - - - The fully qualified path to the output of the referenced project. This should be the same value as the -r - reference in the project options for this referenced project. - - - - - An optional stamp to uniquely identify this set of options - If two sets of options both have stamps, then they are considered equal - if and only if the stamps are equal - - - - - Unused in this API and should be '[]' when used as user-specified input - - - - - Unused in this API and should be 'None' when used as user-specified input - - - - - Timestamp of project/script load, used to differentiate between different instances of a project load. - This ensures that a complete reload of the project or script type checking - context occurs on project or script unload/reload. - - - - - When true, use the reference resolution rules for scripts rather than the rules for compiler. - - - - - When true, the typechecking environment is known a priori to be incomplete, for - example when a .fs file is opened outside of a project. In this case, the number of error - messages reported is reduced. - - - - - The command line arguments for the other projects referenced by this project, indexed by the - exact text used in the "-r:" reference in FSharpProjectOptions. - - - - - Additional command line argument options for the project. These can include additional files and references. - - - - - The files in the project - - - - - This is the unique identifier for the project, it is case sensitive. If it's None, will key off of ProjectFileName in our caching. - - - - - Compute the project directory. - - - - - Whether the two parse options refer to the same project. - - - - - Compare two options sets with respect to the parts of the options that are important to building. - - - - A set of information describing a project or script build configuration. - - - Unused in this API - - - - Will lazily create the ILModuleReader. - Is only evaluated once and can be called by multiple threads. - - - - - Delays the creation of an ILModuleReader - - - - - Notify the host that a project has been fully checked in the background (using file contents provided by the file system API) - - The event may be raised on a background thread. - - - - - Raised after a parse of a file in the background analysis. - - The event will be raised on a background thread. - - - - - Raised after a check of a file in the background analysis. - - The event will be raised on a background thread. - - - - - Notify the host that the logical type checking context for a file has now been updated internally - and that the file has become eligible to be re-typechecked for errors. - The event will be raised on a background thread. - - - - - Report a statistic for testability - - - - - Report a statistic for testability - - - - - Try to get type check results for a file. This looks up the results of recent type checks of the - same file, regardless of contents. The version tag specified in the original check of the file is returned. - 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 intellisense menus and information. - - - The file name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - Optionally, specify source that must match the previous parse precisely. - An optional string used for tracing compiler operations associated with this request. - - - - Tokenize a single line, returning token information and a tokenization state represented by an integer - - - - - Tokenize an entire file, line by line - - - - - Parses a source code for a file. Returns an AST that can be traversed for various features. - - - The path for the file. The file name is also as a module name for implicit top level modules (e.g. in scripts). - The source to be parsed. - Parsing options for the project or script. - Store the parse in a size-limited cache assocaited with the FSharpChecker. Default: true - An optional string used for tracing compiler operations associated with this request. - - - - Parses a source code for a file and caches the results. Returns an AST that can be traversed for various features. - - - The path for the file. The file name is used as a module name for implicit top level modules (e.g. in scripts). - The source to be parsed. - Parsing options for the project or script. - Store the parse in a size-limited cache assocaited with the FSharpChecker. Default: true - An optional string used for tracing compiler operations associated with this request. - - - - Parse and typecheck all files in a project. - All files are read from the FileSystem API - Can cause a second type-check on the entire project when `enablePartialTypeChecking` is true on the FSharpChecker. - - - The options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - - Parse and check a source code file, returning a handle to the results - - - Note: all files except the one being checked are read from the FileSystem API - - - Return FSharpCheckFileAnswer.Aborted if a parse tree was not available. - - - - The name of the file in the project whose source is being checked. - An integer that can be used to indicate the version of the file. This will be returned by TryGetRecentCheckResultsForFile when looking up the file. - The source for the file. - The options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - This function is called when a project has been cleaned/rebuilt, and thus any live type providers should be refreshed. - - - The options describing the project that has been cleaned. - An optional string used for tracing compiler operations associated with this request. - - - - Notify the checker that given file has changed. This needs to be used when checker is created with documentSource = Custom. - - - - - Parse a source code file, returning information about brace matching in the file. - Return an enumeration of the matching parenthetical tokens in the file. - - - The fileName for the file, used to help caching of results. - The full source for the file. - Parsing options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - Parse a source code file, returning information about brace matching in the file. - Return an enumeration of the matching parenthetical tokens in the file. - - - The fileName for the file, used to help caching of results. - The full source for the file. - Parsing options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - This function is called when the configuration is known to have changed for reasons not encoded in the ProjectOptions. - For example, dependent references may have been deleted or created. - - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - An optional string used for tracing compiler operations associated with this request. - - - - This function is called when the entire environment is known to have changed for reasons not encoded in the ProjectOptions of any project/compilation. - - - - - For a given script file, get the FSharpProjectOptions implied by the #load closure. - All files are read from the FileSystem API, except the file being checked. - - - Used to differentiate between scripts, to consider each script a separate project. Also used in formatted error messages. - The source for the file. - Is the preview compiler enabled. - Indicates when the script was loaded into the editing environment, - so that an 'unload' and 'reload' action will cause the script to be considered as a new project, - so that references are re-resolved. - Other flags for compilation. - Add a default reference to the FSharp.Compiler.Interactive.Settings library. - Use the implicit references from the .NET SDK. - Set up compilation and analysis for .NET Framework scripts. - Override the .NET SDK used for default references. - An optional unique stamp for the options. - An optional string used for tracing compiler operations associated with this request. - - - Get the FSharpProjectOptions implied by a set of command line arguments. - - Used to differentiate between projects and for the base directory of the project. - The command line arguments for the project build. - Indicates when the script was loaded into the editing environment, - Indicates that compilation should assume the EDITING define and related settings - Indicates that compilation should assume the INTERACTIVE define and related settings - so that an 'unload' and 'reload' action will cause the script to be considered as a new project, - so that references are re-resolved. - - - - Get the FSharpParsingOptions implied by a FSharpProjectOptions. - - - The overall options. - - - - Get the FSharpParsingOptions implied by a set of command line arguments. - - - The command line arguments for the project build. - Indicates that parsing should assume the INTERACTIVE define and related settings - Indicates that compilation should assume the EDITING define and related settings - - - - Get the FSharpParsingOptions implied by a set of command line arguments and list of source files. - - - Initial source files list. Additional files may be added during argv evaluation. - The command line arguments for the project build. - Indicates that parsing should assume the INTERACTIVE define and related settings - Indicates that compilation should assume the EDITING define and related settings - - - - Get semantic classification for a file. - All files are read from the FileSystem API, including the file being checked. - Can cause a second type-check when `enablePartialTypeChecking` is true on the FSharpChecker. - - - The file name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - An optional string used for tracing compiler operations associated with this request. - - - - Like ParseFile, but uses results from the background builder. - All files are read from the FileSystem API, including the file being checked. - - - The name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - An optional string used for tracing compiler operations associated with this request. - - - - Like CheckFileInProject, but uses the existing results from the background builder. - All files are read from the FileSystem API, including the file being checked. - Can cause a second type-check when `enablePartialTypeChecking` is true on the FSharpChecker. - - - The file name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - An optional string used for tracing compiler operations associated with this request. - - - - Optimized find references for a given symbol in a file of project. - All files are read from the FileSystem API, including the file being checked. - Can cause a second type-check when `enablePartialTypeChecking` is true on the FSharpChecker. - - - The file name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - The symbol to find all uses in the file. - Default: true. If true, this call can invalidate the current state of project if the options have changed. If false, the current state of the project will be used. - Default: false. Experimental feature that makes the operation faster. Requires FSharpChecker to be created with captureIdentifiersWhenParsing = true. - An optional string used for tracing compiler operations associated with this request. - - - - Create an instance of an FSharpChecker. - - - The optional size of the project checking cache. - Keep the checked contents of projects. - If false, do not keep full intermediate checking results from background checking suitable for returning from GetBackgroundCheckResultsForFileInProject. This reduces memory usage. - An optional resolver for legacy MSBuild references - An optional resolver to access the contents of .NET binaries in a memory-efficient way - Indicate whether name suggestion should be enabled - Indicate whether all symbol uses should be kept in background checking - Indicates whether a table of symbol keys should be kept for background compilation - Indicates whether to perform partial type checking. Cannot be set to true if keepAssmeblyContents is true. If set to true, can cause duplicate type-checks when richer information on a file is needed, but can skip background type-checking entirely on implementation files with signature files. - Indicates whether to resolve references in parallel. - When set to true we create a set of all identifiers for each parsed file which can be used to speed up finding references. - Default: FileSystem. You can use Custom source to provide a function that will return the source for a given file path instead of reading it from the file system. Note that with this option the FSharpChecker will also not monitor the file system for file changes. It will expect to be notified of changes via the NotifyFileChanged method. - Default: true. Indicates whether to keep parsing results in a cache. - - - - Compile using the given flags. Source files names are resolved via the FileSystem API. - The output file must be given by a -o flag. - The first argument is ignored and can just be "fsc.exe". - - - The command line arguments for the project build. - An optional string used for tracing compiler operations associated with this request. - - - - Flush all caches and garbage collect - - - - Clear the internal cache of the given projects. - The given project options. - An optional string used for tracing compiler operations associated with this request. - - - - Check a source code file, returning a handle to the results of the parse including - the reconstructed types in the file. - - All files except the one being checked are read from the FileSystem API - Note: returns NoAntecedent if the background builder is not yet done preparing the type check context for the - file (e.g. loading references and parsing/checking files in the project that this file depends upon). - In this case, the caller can either retry, or wait for FileTypeCheckStateIsDirty to be raised for this file. - - - - The results of ParseFile for this file. - The name of the file in the project whose source is being checked. - An integer that can be used to indicate the version of the file. This will be returned by TryGetRecentCheckResultsForFile when looking up the file. - The full source for the file. - The options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - - Check a source code file, returning a handle to the results - - - Note: all files except the one being checked are read from the FileSystem API - - - Return FSharpCheckFileAnswer.Aborted if a parse tree was not available. - - - - The results of ParseFile for this file. - The name of the file in the project whose source is being checked. - An integer that can be used to indicate the version of the file. This will be returned by TryGetRecentCheckResultsForFile when looking up the file. - The full source for the file. - The options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - Used to parse and check F# source code. - - - - - Used for unit testing. Causes all steps of underlying incremental graph evaluation to cancel - - - - - Generalized Incremental Builder. This is exposed only for unit testing purposes. - - - - - Used for unit testing - - - - - test if an arg is a path to fsc.exe - - - - - test if --vserrors flag is set - - - - - test if --test:ErrorRanges flag is set - - - - - do compilation as if args was argv to fsc.exe - - - - - in-proc version of fsc.exe - - - - - combined warning and error details - - - - - build issue details - - - - - build issue location - - - - - Part of LegacyHostedCompilerForTesting - - Yet another DiagnosticsLogger implementation, capturing the messages but only up to the maxerrors maximum - - - - - runs in-proc fsc compilation, returns array consisting of exit code, then compiler output - - - - - splits a provided command line string into argv array - currently handles quotes, but not escaped quotes - - - - diff --git a/lib/fcs/nojaf/Debug/FSharp.Core.dll b/lib/fcs/nojaf/Debug/FSharp.Core.dll deleted file mode 100644 index c2dd582c8f..0000000000 Binary files a/lib/fcs/nojaf/Debug/FSharp.Core.dll and /dev/null differ diff --git a/lib/fcs/nojaf/Debug/FSharp.Core.xml b/lib/fcs/nojaf/Debug/FSharp.Core.xml deleted file mode 100644 index e5298f5ef3..0000000000 --- a/lib/fcs/nojaf/Debug/FSharp.Core.xml +++ /dev/null @@ -1,28468 +0,0 @@ - - -FSharp.Core - - - - Specifies the types of members that are dynamically accessed. - - This enumeration has a attribute that allows a - bitwise combination of its member values. - - - - An abbreviation for the CLI type - - - See the module for further operations related to sequences. - - See also F# Language Guide - Sequences. - - - - An abbreviation for the CLI type - - - The type of immutable singly-linked lists. - - See the module for further operations related to 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. - - See also F# Language Guide - Lists. - - - - 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 - - - Gets the element of the list at the given position. - Lists are represented as linked lists so this is an O(n) operation. - The index. - - The value at the given index. - - - 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 - - - Gets a slice of the list, the elements of the list from the given start index to the given end index. - - The start index. - The end index. - - The sub list specified by the input indices. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. - The offset from the end. - - The corresponding index from the start. - - - Returns a list with head as its first element and tail as its subsequent elements - - A new head value for the list. - The existing list. - - The list with head appended to the front of tail. - - - 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. - - - - - - All the values in the map, including the duplicates. - The sequence will be ordered by the keys of the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Values // evaluates to seq ["a"; "b"] - - - - - The keys in the map. - The sequence will be ordered by the keys of the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Keys // evaluates to seq [1; 2] - - - - - Lookup an element in the map. Raise KeyNotFoundException if no binding - exists in the map. - - The input key. - Thrown when the key is not found. - - The value mapped to the key. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.[1] // evaluates to "a" - sample.[3] // throws KeyNotFoundException - - - - - Returns true if there are no bindings in the map. - - - - let emptyMap: Map<int, string> = Map.empty - emptyMap.IsEmpty // evaluates to true - - let notEmptyMap = Map [ (1, "a"); (2, "b") ] - notEmptyMap.IsEmpty // evaluates to false - - - - - The number of bindings in the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Count // evaluates to 2 - - - - - Lookup an element in the map, assigning to value if the element is in the domain - of the map and returning false if not. - - The input key. - A reference to the output value. - - true if the value is present, false if not. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.TryGetValue 1 // evaluates to (true, "a") - sample.TryGetValue 3 // evaluates to (false, null) - - let mutable x = "" - sample.TryGetValue (1, &x) // evaluates to true, x set to "a" - - let mutable y = "" - sample.TryGetValue (3, &y) // evaluates to false, y unchanged - - - - - 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 input key. - - The mapped value, or None if the key is not in the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.TryFind 1 // evaluates to Some "a" - sample.TryFind 3 // evaluates to None - - - - - Removes an element from the domain of the map. No exception is raised if the element is not present. - - The input key. - - The resulting map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Remove 1 // evaluates to map [(2, "b")] - sample.Remove 3 // equal to sample - - - - - Tests if an element is in the domain of the map. - - The input key. - - True if the map contains the given key. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.ContainsKey 1 // evaluates to true - sample.ContainsKey 3 // evaluates to false - - - - - Returns a new map with the value stored under key changed according to f. - - The input key. - The change function. - - The resulting map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - let f x = - match x with - | Some s -> Some (s + "z") - | None -> None - - sample.Change (1, f) // evaluates to map [(1, "az"); (2, "b")] - - - - - Returns a new map with the binding added to the given map. - If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. - The key to add. - The value to add. - - The resulting map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Add (3, "c") // evaluates to map [(1, "a"); (2, "b"); (3, "c")] - sample.Add (2, "aa") // evaluates to map [(1, "a"); (2, "aa")] - - - - - Builds a map that contains the bindings of the given IEnumerable. - - The input sequence of key/value pairs. - - The resulting map. - - - - Map [ (1, "a"); (2, "b") ] // evaluates to map [(1, "a"); (2, "b")] - - - - - Immutable maps based on binary trees, where keys are ordered by F# generic comparison. By default - comparison is the F# structural comparison function or uses implementations of the IComparable interface on key values. - - See the module for further operations on maps. - - All members of this class are thread-safe and may be used concurrently from multiple threads. - - - Returns a new set with the elements of the second set removed from the first. - - The first input set. - The second input set. - - A set containing elements of the first set that are not contained in the second set. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"The new set is: {set1 - set2}" - - The sample evaluates to the following output: The new set is: set [1] - - - - Compute the union of the two sets. - - The first input set. - The second input set. - - The union of the two input sets. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"Output is %A" {set1 + set2}" - - The sample evaluates to the following output: The new set is: set [1; 2; 3; 4] - - - - Returns the lowest element in the set according to the ordering being used for the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"MinimumElement: {set.MinimumElement}" - - The sample evaluates to the following output: MinimumElement: 1 - - - - Returns the highest element in the set according to the ordering being used for the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"MaximumElement: {set.MaximumElement}" - - The sample evaluates to the following output: MaximumElement: 3 - - - - A useful shortcut for Set.isEmpty. See the Set module for further operations on sets. - - - - let set = Set.empty.Add(2).Add(3) - printfn $"Is the set empty? {set.IsEmpty}" - - The sample evaluates to the following output: Is the set empty? false - - - - The number of elements in the set - - - - let set = Set.empty.Add(1).Add(1).Add(2) - printfn $"The set has {set.Count} elements" - - The sample evaluates to the following output: The set has 3 elements - - - - 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. - - The value to remove from the set. - - The result set. - - - - let set = Set.empty.Add(1).Add(1).Add(2) - printfn $"The new set is: {set}" - - The sample evaluates to the following output: The new set is: set [2] - - - - Evaluates to "true" if all elements of the second set are in the first. - - The set to test against. - - True if this set is a superset of otherSet. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a superset of {set2}? {Set.isSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a superset of set [1; 2; 3; 4]? false - - - - Evaluates to "true" if all elements of the first set are in the second. - - The set to test against. - - True if this set is a subset of otherSet. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a subset of {set2}? {Set.isSubset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a subset of set [1; 2; 3; 4]? true - - - - Evaluates to "true" if all elements of the second set are in the first, and at least - one element of the first is not in the second. - - The set to test against. - - True if this set is a proper superset of otherSet. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a proper superset of {set2}? {Set.isProperSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a proper superset of set [1; 2; 3; 4]? false - - - - Evaluates to "true" if all elements of the first set are in the second, and at least - one element of the second is not in the first. - - The set to test against. - - True if this set is a proper subset of otherSet. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a proper superset of {set2}? {Set.isProperSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a proper subset of set [1; 2; 3; 4]? true - - - - A useful shortcut for Set.contains. See the Set module for further operations on sets. - - The value to check. - - True if the set contains value. - - - - let set = Set.empty.Add(2).Add(3) - printfn $"Does the set contain 1? {set.Contains(1)}" - - The sample evaluates to the following output: Does the set contain 1? false - - - - 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. - - The value to add to the set. - - The result set. - - - - let set = Set.empty.Add(1).Add(1).Add(2) - printfn $"The new set is: {set}" - - The sample evaluates to the following output: The new set is: set [1; 2] - - - - Create a set containing elements drawn from the given sequence. - The input sequence. - - The result set. - - - - let sequenceOfNumbers = seq { 1 .. 3 } - let numbersInSet = Set(sequenceOfNumbers) - printfn $"The set is {numbersInSet}" - - - Creates a new Set containing the elements of the given sequence. set [1; 2; 3] - - - Immutable sets based on binary trees, where elements are ordered by F# generic comparison. By default - comparison is the F# structural comparison function or uses implementations of the IComparable interface on element values. - - See the module for further operations on sets. - - All members of this class are thread-safe and may be used concurrently from multiple threads. - - - Fetches an element from a 2D array. You can also use the syntax array.[index1,index2]. - - The input array. - The index along the first dimension. - The index along the second dimension. - - The value of the array at the given index. - Thrown when the indices are negative or exceed the bounds of the array. - - - Indexer syntax is generally preferred, e.g. - - let array = array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ] - - array[0,1] - - Evaluates to 2.0. - - - - - let array = array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ] - - Array2D.get array 0 1 - - Evaluates to 2.0. - - - - Sets the value of an element in an array. You can also use the syntax array.[index1,index2] <- value. - - The input array. - The index along the first dimension. - The index along the second dimension. - The value to set in the array. - - Thrown when the indices are negative or exceed the bounds of the array. - - - Indexer syntax is generally preferred, e.g. - - let array = Array2D.zeroCreate 2 2 - - array[0,1] <- 4.0 - - - - - - let array = Array2D.zeroCreate 2 2 - - Array2D.set array 0 1 4.0 - - After evaluation array is a 2x2 array with contents [[0.0; 4.0]; [0.0; 0.0]] - - - - Builds 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. - - The input array. - - The zero-based output array. - - - - let inputs = Array2D.createBased 1 1 2 3 1 - - inputs |> Array2D.rebase - - Evaluates to a 2x2 zero-based array with contents [[1; 1]; [1; 1]] - - - - Builds 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 propagated to the output - array. - - A function that is applied to transform each element of the array. The two integers - provide the index of the element. - The input array. - - An array whose elements have been transformed by the given mapping. - - - - let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - - inputs |> Array2D.mapi (fun i j v -> i + j + v) - - Evaluates to a 2x2 array with contents [[3; 5;]; [14; 16]] - - - - Builds 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 propagated to the output - array. - - A function that is applied to transform each item of the input array. - The input array. - - An array whose elements have been transformed by the given mapping. - - - - let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - - inputs |> Array2D.map (fun v -> 2 * v) - - Evaluates to a 2x2 array with contents [[6; 8;]; [26; 28]] - - - - Returns the length of an array in the second dimension. - - The input array. - - The length of the array in the second dimension. - - - - let array = array2D [ [ 3; 4; 5 ]; [ 13; 14; 15 ] ] - - array |> Array2D.length2 - - Evaluates to 3. - - - - Returns the length of an array in the first dimension. - - The input array. - - The length of the array in the first dimension. - - - - let array = array2D [ [ 3; 4; 5 ]; [ 13; 14; 15 ] ] - - array |> Array2D.length1 - - Evaluates to 2. - - - - Applies the given function to each element of the array. The integer indices passed to the - function indicates the index of element. - - A function to apply to each element of the array with the indices available as an argument. - The input array. - - - - let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - - inputs |> Array2D.iteri (fun i j v -> printfn $"value at ({i},{j}) = {v}") - - Evaluates to unit and prints - - value at (0,0) = 3 - value at (0,1) = 4 - value at (1,0) = 13 - value at (1,1) = 14 - - in the console. - - - - Applies the given function to each element of the array. - - A function to apply to each element of the array. - The input array. - - - - let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - - inputs |> Array2D.iter (fun v -> printfn $"value = {v}") - - Evaluates to unit and prints - - value = 3 - value = 4 - value = 13 - value = 14 - - in the console. - - - - Creates a based array where the entries are initially Unchecked.defaultof<'T>. - - The base for the first dimension of the array. - The base for the second dimension of the array. - The length of the first dimension of the array. - The length of the second dimension of the array. - - The created array. - Thrown when base1, base2, length1, or length2 is negative. - - - - Array2D.zeroCreateBased 1 1 2 3 - - Evaluates to a 2x3 1-based array with contents [[0; 0; 0]; [0; 0; 0]] - - - - - Creates a based array whose elements are all initially the given value. - - The base for the first dimension of the array. - The base for the second dimension of the array. - The length of the first dimension of the array. - The length of the second dimension of the array. - The value to populate the new array. - - The created array. - Thrown when base1, base2, length1, or length2 is negative. - - - - Array2D.createBased 1 1 2 3 1 - - Evaluates to a 2x3 1-based array with contents [[1; 1; 1]; [1; 1; 1]] - - - - - Creates a based array given the dimensions and a generator function to compute the elements. - - The base for the first dimension of the array. - The base for the second dimension of the array. - The length of the first dimension of the array. - The length of the second dimension of the array. - A function to produce elements of the array given the two indices. - - The created array. - Thrown when base1, base2, length1, or length2 is negative. - - - - Array2D.initBased 1 1 2 3 (fun i j -> i + j) - - Evaluates to a 2x3 1-based array with contents [[2; 3; 4]; [3; 4; 5]] - - - - - Creates an array where the entries are initially Unchecked.defaultof<'T>. - - The length of the first dimension of the array. - The length of the second dimension of the array. - - The created array. - Thrown when length1 or length2 is negative. - - - - Array2D.zeroCreate 2 3 - - Evaluates to a 2x3 array with contents [[0; 0; 0]; [0; 0; 0]] - - - - - Creates an array whose elements are all initially the given value. - - The length of the first dimension of the array. - The length of the second dimension of the array. - The value to populate the new array. - - The created array. - Thrown when length1 or length2 is negative. - - - - Array2D.create 2 3 1 - - Evaluates to a 2x3 array with contents [[1; 1; 1]; [1; 1; 1]] - - - - - Creates an array given the dimensions and a generator function to compute the elements. - - The length of the first dimension of the array. - The length of the second dimension of the array. - A function to produce elements of the array given the two indices. - - The generated array. - Thrown when either of the lengths is negative. - - - - Array2D.init 2 3 (fun i j -> i + j) - - Evaluates to a 2x3 array with contents [[0; 1; 2]; [1; 2; 3]] - - - - - Reads a range of elements from the first array and write them into the second. - - The source array. - The first-dimension index to begin copying from in the source array. - The second-dimension index to begin copying from in the source array. - The target array. - The first-dimension index to begin copying into in the target array. - The second-dimension index to begin copying into in the target array. - The number of elements to copy across the first dimension of the arrays. - The number of elements to copy across the second dimension of the arrays. - Thrown when any of the indices are negative or if either of - the counts are larger than the dimensions of the array allow. - - - Slicing syntax is generally preferred, e.g. - - let source = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - let target = array2D [ [ 2; 2; 2 ]; [ 12; 12; 12 ] ] - target[0..1,1..2] <- source - - - - - - let source = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - let target = array2D [ [ 2; 2; 2 ]; [ 12; 12; 12 ] ] - - Array2D.blit source 0 0 target 0 1 2 2 - - After evaluation target contains [ [ 2; 3; 4 ]; [ 12; 13; 14 ] ]. - - - - Builds 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 propagated to the output - array. - - The input array. - - A copy of the input array. - - - - open System - - let array = Array2D.zeroCreate<int> 10 10 - - array |> Array2D.copy - - Evaluates to a new copy of the 10x10 array. - - - - Fetches the base-index for the second dimension of the array. - - The input array. - - The base-index of the second dimension of the array. - - Create a 10x10 1-based array: - - open System - - let array = Array.CreateInstance(typeof<int>, [| 10; 10 |], [| 1; 1 |]) :?> int[,] - - array |> Array2D.base2 - - Evaluates to 1. - - - - Fetches the base-index for the first dimension of the array. - - The input array. - - The base-index of the first dimension of the array. - - Create a 10x10 1-based array: - - open System - - let array = Array.CreateInstance(typeof<int>, [| 10; 10 |], [| 1; 1 |]) :?> int[,] - - array |> Array2D.base1 - - Evaluates to 1. - - - - Contains operations for working with 2-dimensional arrays. - - - See also F# Language Guide - Arrays. - - F# and CLI multi-dimensional arrays are typically zero-based. - However, CLI 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 propagated to a matching output - array on the Array2D.map and Array2D.mapi operations. - Non-zero-based arrays can also be created using Array2D.zeroCreateBased, - Array2D.createBased and Array2D.initBased. - - - - Get an implementation of equality semantics using the given functions. - - A function to generate a hash code from a value. - A function to test equality of two values. - - An object implementing using the given functions. - - Create a dictionary which uses the given functions for equality and hashing: - - open System.Collections.Generic - - let modIdentity = HashIdentity.FromFunctions((fun i -> i%5), (fun i1 i2 -> i1%5 = i2%5)) - let dict = new Dictionary<int,int>(HashIdentity.FromFunctions) - - dict.[2] <- 6 - dict.[7] <- 10 - - In this example, only one entry is added, as the keys 2 and 7 have the same hash and are equal according to the provided functions. - - - - Get an implementation of equality semantics using reference equality and reference hashing. - - - An object implementing using - and . - - - Create a dictionary which uses reference equality and hashing on the key, giving each key reference identity: - - open System.Collections.Generic - - let dict = new Dictionary<int[],int>(HashIdentity.Structural) - - let arr1 = [| 1;2;3 |] - let arr2 = [| 1;2;3 |] - dict.Add(arr1, 6) - dict.Add(arr2, 7) - - In this example, two entries are added to the dictionary, as the arrays have different object reference identity. - - - - Get an implementation of equality semantics semantics using limited structural equality and structural hashing. - - The limit on the number of hashing operations used. - - An object implementing . - - Create a dictionary which uses limited structural equality and structural hashing on the key, allowing trees as efficient keys: - - open System.Collections.Generic - - type Tree = Tree of int * Tree list - - let dict = new Dictionary<Tree,int>(HashIdentity.LimitedStructural 4) - - let tree1 = Tree(0, []) - let tree2 = Tree(0, [tree1; tree1]) - dict.Add(tree1, 6) - dict.Add(tree2, 7) - - - - - Get an implementation of equality semantics using non-structural equality and non-structural hashing. - - - An object implementing using - and . - - - Create a dictionary which uses non-structural equality and hashing on the key: - - open System.Collections.Generic - - let dict = new Dictionary<System.DateTime,int>(HashIdentity.NonStructural) - - dict.Add(System.DateTime.Now, 1) - - - - - Get an implementation of equality semantics using structural equality and structural hashing. - - An object implementing using and . - - Create a dictionary which uses structural equality and structural hashing on the key, allowing an array as a key: - - open System.Collections.Generic - - let dict = new Dictionary<int[],int>(HashIdentity.Structural) - - let arr1 = [| 1;2;3 |] - let arr2 = [| 1;2;3 |] - - dict.[arr1] <- 6 - dict.[arr2] >- 7 - - In this example, only one entry is added to the dictionary, as the arrays identical by structural equality. - - - - Common notions of value identity implementing the - interface, for constructing objects and other collections - - - Get an implementation of comparison semantics using the given function. - - A function to compare two values. - - An object implementing using the supplied function. - - Create and use a comparer using the given function: - - let comparer = ComparisonIdentity.FromFunction(fun i1 i2 -> compare (i1%5) (i2%5)) - - comparer.Compare(7, 2) - - Evaluates to 0because 7 and 2 compare as equal using to the provided function. - - - - Get an implementation of comparison semantics using non-structural comparison. - - An object implementing using . - - Create and use a comparer using structural comparison: - - let comparer = ComparisonIdentity.NonStructural<System.DateTime> - - comparer.Compare(System.DateTime.Now, System.DateTime.Today) - - Evaluates to 1. - - - - Get an implementation of comparison semantics using structural comparison. - - An object implementing using . - - Create and use a comparer using structural comparison: - - let compareTuples = ComparisonIdentity.Structural<int * int> - - compareTuples.Compare((1, 4), (1, 5)) - - Evaluates to -1. - - - - Common notions of value ordering implementing the - interface, for constructing sorted data structures and performing sorting operations. - - - Return a new sequence with new items inserted before the given index. - - The index where the items should be inserted. - The values to insert. - The input sequence. - - The result sequence. - - Thrown when index is below 0 or greater than source.Length. - - - - seq { 0; 1; 2 } |> Seq.insertManyAt 1 [8; 9] - - Evaluates to a sequence yielding the same results as seq { 0; 8; 9; 1; 2 }. - - - - Return a new sequence with a new item inserted before the given index. - - The index where the item should be inserted. - The value to insert. - The input sequence. - - The result sequence. - - Thrown when index is below 0 or greater than source.Length. - - - - seq { 0; 1; 2 } |> Seq.insertAt 1 9 - - Evaluates to a sequence yielding the same results as seq { 0; 9; 1; 2 }. - - - - Return a new sequence with the item at a given index set to the new value. - - The index of the item to be replaced. - The new value. - The input sequence. - - The result sequence. - - Thrown when index is outside 0..source.Length - 1 - - - - seq { 0; 1; 2 } |> Seq.updateAt 1 9 - - Evaluates to a sequence yielding the same results as seq { 0; 9; 2 }. - - - - Return a new sequence with the number of items starting at a given index removed. - - The index of the item to be removed. - The number of items to remove. - The input sequence. - - The result sequence. - - Thrown when index is outside 0..source.Length - count - - - - seq { 0; 1; 2; 3 } |> Seq.removeManyAt 1 2 - - Evaluates to a sequence yielding the same results as seq { 0; 3 }. - - - - Return a new sequence with the item at a given index removed. - - The index of the item to be removed. - The input sequence. - - The result sequence. - - Thrown when index is outside 0..source.Length - 1 - - - - seq { 0; 1; 2 } |> Seq.removeAt 1 - - Evaluates to a sequence yielding the same results as seq { 0; 2 }. - - - - Combines the three sequences into a sequence of triples. The sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other - sequences are ignored. - - The first input sequence. - The second input sequence. - The third input sequence. - - The result sequence. - - Thrown when any of the input sequences is null. - - - - let numbers = [1; 2] - let names = ["one"; "two"] - let roman = ["I"; "II"] - - Seq.zip3 numbers names roman - - Evaluates to a sequence yielding the same results as seq { (1, "one", "I"); (2, "two", "II") }. - - - - Combines the two sequences into a sequence of pairs. The two sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other - sequence are ignored. - - The first input sequence. - The second input sequence. - - The result sequence. - - Thrown when either of the input sequences is null. - - - - let numbers = [1; 2] - let names = ["one"; "two"] - - Seq.zip numbers names - - Evaluates to a sequence yielding the same results as seq { (1, "one"); (2, "two") }. - - - - Returns a sequence yielding sliding windows containing elements drawn from the input - sequence. Each window is returned as a fresh array. - - The number of elements in each window. - The input sequence. - - The result sequence. - Thrown when the input sequence is null. - Thrown when windowSize is not positive. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.windowed 3 - - Evaluates to a sequence of arrays yielding the results seq { [| 1; 2; 3 |]; [| 2; 3; 4 |]; [| 3; 4; 5 |] } - - - - Returns 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. - - The stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. - - A function that takes in the current state and returns an option tuple of the next - element of the sequence and the next state value. - The initial state value. - - The result sequence. - - - - 1 |> Seq.unfold (fun state -> if state > 100 then None else Some (state, state * 2)) - - Evaluates to a sequence yielding the same results as seq { 1; 2; 4; 8; 16; 32; 64 } - - - - - 1I |> Seq.unfold (fun state -> Some (state, state * 2I)) - - Evaluates to an infinite sequence yielding the results seq { 1I; 2I; 4I; 8I; ... } - - - - Returns a sequence that when enumerated returns at most N elements. - - The maximum number of items to enumerate. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.truncate 2 - - Evaluates to a sequence yielding the same results as seq { "a"; "b" } - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.truncate 6 - - Evaluates to a sequence yielding the same results as seq { "a"; "b"; "c"; "d" } - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.truncate 0 - - Evaluates to the empty sequence. - - - - Returns the transpose of the given sequence of sequences. - - 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 input sequence. - - The transposed sequence. - - Thrown when the input sequence is null. - - - - let inputs = - [ [ 10; 20; 30 ] - [ 11; 21; 31 ] ] - - inputs |> Seq.transpose - - Evaluates to a sequence of sequences yielding the same results as [ [10; 11]; [20; 21]; [30; 31] ]. - - - - Applies the given function to successive elements, returning the first - result where the function returns "Some(x)". - - A function that transforms items from the input sequence into options. - The input sequence. - - The chosen element or None. - - Thrown when the input sequence is null. - - - - let input = [1; 2; 3] - - input |> Seq.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to Some "2". - - - - - let input = [1; 2; 3] - - input |> Seq.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Evaluates to None. - - - - Returns the index of the last element in the sequence - that satisfies the given predicate. Return None if no such element exists. - - This function digests the whole initial sequence as soon as it is called. As a - result this function should not be used with large or infinite sequences. - - A function that evaluates to a Boolean when given an item in the sequence. - The input sequence. - - The found index or None. - - Thrown when the input sequence is null. - - Try to find the index of the first even number from the back: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 3 - - - Try to find the index of the first even number from the back: - - let inputs = [1; 3; 5; 7] - - inputs |> Seq.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Tries to find the nth element in the sequence. - Returns None if index is negative or the input sequence does not contain enough elements. - - The index of element to retrieve. - The input sequence. - - The nth element of the sequence or None. - Thrown when the input sequence is null. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.tryItem 1 - - Evaluates to Some "b". - - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.tryItem 4 - - Evaluates to None. - - - - Returns the index of the first element in the sequence - that satisfies the given predicate. Return None if no such element exists. - - A function that evaluates to a Boolean when given an item in the sequence. - The input sequence. - - The found index or None. - - Thrown when the input sequence is null. - - Try to find the index of the first even number: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to Some 1 - - - Try to find the index of the first even number: - - let inputs = [1; 3; 5; 7] - - inputs |> Seq.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the last element for which the given function returns True. - Return None if no such element exists. - - This function digests the whole initial sequence as soon as it is called. As a - result this function should not be used with large or infinite sequences. - - A function that evaluates to a Boolean when given an item in the sequence. - The input sequence. - - The found element or None. - - Thrown when the input sequence is null. - - Try to find the first even number from the back: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 4 - - - Try to find the first even number from the back: - - let inputs = [1; 5; 3] - - inputs |> Seq.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the first element for which the given function returns True. - Return None if no such element exists. - - A function that evaluates to a Boolean when given an item in the sequence. - The input sequence. - - The found element or None. - - Thrown when the input sequence is null. - - Try to find the first even number: - - let inputs = [1; 2; 3] - - inputs |> Seq.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to Some 2 - - - Try to find the first even number: - - let inputs = [1; 5; 3] - - inputs |> Seq.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Builds a list from the given collection. - - The input sequence. - - The result list. - - Thrown when the input sequence is null. - - - - let inputs = seq { 1; 2; 5 } - - inputs |> Seq.toList - - Evaluates to [ 1; 2; 5 ]. - - - - Builds an array from the given collection. - - The input sequence. - - The result array. - - Thrown when the input sequence is null. - - - - let inputs = seq { 1; 2; 5 } - - inputs |> Seq.toArray - - Evaluates to [| 1; 2; 5 |]. - - - - Returns a sequence that, when iterated, yields elements of the underlying sequence while the - given predicate returns True, and then returns no further elements. - - A function that evaluates to false when no more items should be returned. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "bb"; "ccc"; "d"] - - inputs |> Seq.takeWhile (fun x -> x.Length < 3) - - Evaluates to a sequence yielding the same results as seq { "a"; "bb" } - - - - Returns the first N elements of the sequence. - - Throws InvalidOperationException - if the count exceeds the number of elements in the sequence. Seq.truncate - returns as many items as the sequence contains instead of throwing an exception. - - The number of items to take. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty and the count is greater than zero. - Thrown when count exceeds the number of elements - in the sequence. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.take 2 - - Evaluates to a sequence yielding the same results as ["a"; "b"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.take 6 - - Throws InvalidOperationException. - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.take 0 - - Evaluates to a sequence yielding no results. - - - - Returns a sequence that skips 1 element of the underlying sequence and then yields the - remaining elements of the sequence. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = ["a"; "bb"; "ccc"] - - inputs |> Seq.tail - - Evaluates to a sequence yielding the same results as seq { "bb"; "ccc" } - - - - - Returns 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. - - A function to transform items from the input sequence into the type that will be summed. - The input sequence. - - The computed sum. - - - - let input = [ "aa"; "bbb"; "cc" ] - - input |> Seq.sumBy (fun s -> s.Length) - - Evaluates to 7. - - - - Returns the sum of the elements in the sequence. - - The elements are summed using the + operator and Zero property associated with the generated type. - - The input sequence. - - The computed sum. - - - - let input = [ 1; 5; 3; 2 ] - - input |> Seq.sum - - Evaluates to 11. - - - - Applies a key-generating function to each element of a sequence and yield a sequence ordered - descending by keys. The keys are compared using generic comparison as implemented by . - - 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. - - This is a stable sort, that is the original order of equal elements is preserved. - - A function to transform items of the input sequence into comparable keys. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = ["a"; "bbb"; "cccc"; "dd"] - - input |> Seq.sortByDescending (fun s -> s.Length) - - Evaluates to a sequence yielding the same results as seq { "cccc"; "bbb"; "dd"; "a" }. - - - - Yields a sequence ordered descending by keys. - - 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. - - This is a stable sort, that is the original order of equal elements is preserved. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = seq { 8; 4; 3; 1; 6; 1 } - - input |> Seq.sortDescending - - Evaluates to a sequence yielding the same results as seq { 8; 6; 4; 3; 1; 1 }. - - - - Applies 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 . - - 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 and uses a stable sort, that is the original order of equal elements is preserved. - - A function to transform items of the input sequence into comparable keys. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = [ "a"; "bbb"; "cccc"; "dd" ] - - input |> Seq.sortBy (fun s -> s.Length) - - Evaluates to a sequence yielding the same results as seq { "a"; "dd"; "bbb"; "cccc" }. - - - - Yields a sequence ordered using the given comparison function. - - 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 and uses a stable sort, that is the original order of equal elements is preserved. - - The function to compare the collection elements. - The input sequence. - - The result sequence. - - Sort a sequence of pairs using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let input = [ (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") ] - - input |> Seq.sortWith compareEntries - - Evaluates to a sequence yielding the same results as seq { (0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb") }. - - - - Yields a sequence ordered by keys. - - 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 and uses a stable sort, that is the original order of equal elements is preserved. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = seq { 8; 4; 3; 1; 6; 1 } - - Seq.sort input - - Evaluates to a sequence yielding the same results as seq { 1; 1 3; 4; 6; 8 }. - - - - Returns 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. - - A function that evaluates an element of the sequence to a boolean value. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = seq { "a"; "bbb"; "cc"; "d" } - - inputs |> Seq.skipWhile (fun x -> x.Length < 3) - - Evaluates a sequence yielding the same results as seq { "bbb"; "cc"; "d" } - - - - Returns a sequence that skips N elements of the underlying sequence and then yields the - remaining elements of the sequence. - - The number of items to skip. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - Thrown when count exceeds the number of elements - in the sequence. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.skip 2 - - Evaluates a sequence yielding the same results as seq { "c"; "d" } - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.skip 5 - - Throws ArgumentException. - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.skip -1 - - Evaluates a sequence yielding the same results as seq { "a"; "b"; "c"; "d" }. - - - - Returns a sequence yielding one item only. - - The input item. - - The result sequence of one item. - - - - Seq.singleton 7 - - Evaluates to a sequence yielding the same results as seq { 7 }. - - - - Like foldBack, but returns the sequence of intermediary and final results. - - 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. - - - A function that updates the state with each element from the sequence. - The input sequence. - The initial state. - - The resulting sequence of computed states. - - Thrown when the input sequence is null. - - Apply a list charges from back to front, and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [ In 1; Out 2; In 3 ] - - (inputs, 0) ||> Seq.scanBack (fun charge acc -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to a sequence yielding the same results as seq { 2; 1; 3; 0 } by processing each input from back to front. Note 0 is the intial - state, 3 the next state, 1 the next state, and 2 the final state, and the states - are produced from back to front. - - - - Like fold, but computes on-demand and returns the sequence of intermediary and final results. - - A function that updates the state with each element from the sequence. - The initial state. - The input sequence. - - The resulting sequence of computed states. - - Thrown when the input sequence is null. - - Apply a list charges and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = seq { In 1; Out 2; In 3 } - - (0, inputs) ||> Seq.scan (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to a sequence yielding the same results as seq { 0; 1; -1; 2 }. Note 0 is the intial - state, 1 the next state, -1 the next state, and 2 the final state. - - - - Returns a new sequence with the elements in reverse order. - - The input sequence. - - The reversed sequence. - - Thrown when the input sequence is null. - - This function consumes the whole input sequence before yielding the first element of the reversed sequence. - - - - let input = seq { 0; 1; 2 } - - input |> Seq.rev - - Evaluates to a sequence yielding the same results as seq { 2; 1; 0 }. - - - - Applies a function to each element of the sequence, starting from the end, 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)). - - A function that takes in the next-to-last element of the sequence and the - current accumulated result to produce the next accumulated result. - The input sequence. - - The final result of the reductions. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - This function consumes the whole input sequence before returning the result. - - - - let inputs = [1; 3; 4; 2] - - inputs |> Seq.reduceBack (fun a b -> a + b * 10) - - Evaluates to 2431, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10 - - - - Creates a sequence by replicating the given initial value. - - The number of elements to replicate. - The value to replicate - - The generated sequence. - - - - Seq.replicate 3 "a" - - Evaluates to a sequence yielding the same results as seq { "a"; "a"; "a" }. - - - - Applies 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. - - A function that takes in the current accumulated result and the next - element of the sequence to produce the next accumulated result. - The input sequence. - - The final result of the reduction function. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = [1; 3; 4; 2] - - inputs |> Seq.reduce (fun a b -> a * 10 + b) - - Evaluates to 1342, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2 - - - - Builds a new sequence object that delegates to the given sequence object. This ensures - the original sequence cannot 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 cannot cast the returned sequence object to an array. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = [| 1; 2; 3 |] - - input |> Seq.readonly - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 }. - - - - - let input = [| 1; 2; 3 |] - - let readonlyView = input |> Seq.readonly - - (readonlyView :?> int[]).[1] <- 4 - - Throws an InvalidCastException. - - - - Applies the given function to successive elements, returning the first - x where the function returns "Some(x)". - - A function to transform each item of the input sequence into an option of the output type. - The input sequence. - - The selected element. - - Thrown when the input sequence is null. - Thrown when every item of the sequence - evaluates to None when the given function is applied. - - - - let input = [1; 2; 3] - - input |> Seq.pick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to "2". - - - - - let input = [1; 2; 3] - - input |> Seq.pick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Throws KeyNotFoundException. - - - - - Returns a sequence with all elements permuted according to the - specified permutation. - - This function consumes the whole input sequence before yielding the first element of the result sequence. - - The function that maps input indices to output indices. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - Thrown when indexMap does not produce a valid permutation. - - - - let inputs = [1; 2; 3; 4] - - inputs |> Seq.permute (fun x -> (x + 1) % 4) - - Evaluates to a sequence yielding the same results as seq { 4; 1; 2; 3 }. - - - - Returns 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. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = seq { 1; 2; 3; 4 } - - inputs |> Seq.pairwise - - Evaluates to a sequence yielding the same results as seq { (1, 2); (2, 3); (3, 4) }. - - - - Views the given list as a sequence. - - The input list. - - The result sequence. - - - - let inputs = [ 1; 2; 5 ] - - inputs |> Seq.ofList - - Evaluates to a sequence yielding the same results as seq { 1; 2; 5 }. - - - - Views the given array as a sequence. - - The input array. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [| 1; 2; 5 |] - - inputs |> Seq.ofArray - - Evaluates to a sequence yielding the same results as seq { 1; 2; 5 }. - - - - Computes the nth element in the collection. - - The index of element to retrieve. - The input sequence. - - The nth element of the sequence. - - Thrown when the input sequence is null. - Thrown when the index is negative or the input sequence does not contain enough elements. - - - Returns the lowest of all elements of the sequence, compared via Operators.min on the function result. - - A function to transform items from the input sequence into comparable keys. - The input sequence. - - The smallest element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = [ "aaa"; "b"; "cccc" ] - - inputs |> Seq.minBy (fun s -> s.Length) - - Evaluates to "b" - - - - - let inputs = [] - - inputs |> Seq.minBy (fun (s: string) -> s.Length) - - Throws System.ArgumentException. - - - - Returns the lowest of all elements of the sequence, compared via Operators.min. - - The input sequence. - - The smallest element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = [10; 12; 11] - - inputs |> Seq.min - - Evaluates to 10 - - - - - let inputs = [] - - inputs |> Seq.min - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the sequence, compared via Operators.max on the function result. - - A function to transform items from the input sequence into comparable keys. - The input sequence. - - The largest element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = ["aaa"; "b"; "cccc"] - - inputs |> Seq.maxBy (fun s -> s.Length) - - Evaluates to "cccc" - - - - - let inputs = [ ] - - inputs |> Seq.maxBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the sequence, compared via Operators.max - - The input sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - The largest element of the sequence. - - - - let inputs = [ 10; 12; 11 ] - - inputs |> Seq.max - - Evaluates to 12 - - - - - let inputs = [ ] - - inputs |> Seq.max - - Throws System.ArgumentException. - - - - Builds 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. The integer index passed to the - function indicates the index (from 0) of element being transformed. - - A function to transform pairs of items from the input sequences that also supplies the current index. - The first input sequence. - The second input sequence. - - The result sequence. - - Thrown when either of the input sequences is null. - - - - let inputs1 = ["a"; "bad"; "good"] - let inputs2 = [0; 2; 1] - - (inputs1, inputs2) ||> Seq.mapi2 (fun i x y -> i, x[y]) - - Evaluates to a sequence yielding the same results as seq { (0, 'a'); (1, 'd'); (2, 'o') } - - - - Builds 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. - - A function to transform items from the input sequence that also supplies the current index. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [ 10; 10; 10 ] - - inputs |> Seq.mapi (fun i x -> i + x) - - Evaluates to a sequence yielding the same results as seq { 10; 11; 12 } - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding triples of elements from the three sequences. If one input sequence if shorter than - the others then the remaining elements of the longer sequences are ignored. - - The function to transform triples of elements from the input sequences. - The first input sequence. - The second input sequence. - The third input sequence. - - The result sequence. - - Thrown when any of the input sequences is null. - - - - let inputs1 = [ "a"; "t"; "ti" ] - let inputs2 = [ "l"; "h"; "m" ] - let inputs3 = [ "l"; "e"; "e" ] - - (inputs1, inputs2, inputs3) |||> Seq.map3 (fun x y z -> x + y + z) - - Evaluates to a sequence yielding the same results as seq { "all"; "the"; "time" } - - - - - Combines map and foldBack. Builds a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The function is also used to accumulate a final value. - - This function digests the whole initial sequence as soon as it is called. As a result this function should - not be used with large or infinite sequences. - - The function to transform elements from the input collection and accumulate the final value. - The input collection. - The initial state. - - Thrown when the input collection is null. - - The collection of transformed elements, and the final accumulated value. - - Accumulate the charges from back to front, and double them as well - - type Charge = - | In of int - | Out of int - - let inputs = seq { In 1; Out 2; In 3 } - - let newCharges, balance = - (inputs, 0) ||> Seq.mapFoldBack (fun charge acc -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to seq { In 2; Out 4; In 6 } and balance to 2. - - - - Combines map and fold. Builds a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The function is also used to accumulate a final value. - - This function digests the whole initial sequence as soon as it is called. As a result this function should - not be used with large or infinite sequences. - - The function to transform elements from the input collection and accumulate the final value. - The initial state. - The input collection. - - Thrown when the input collection is null. - - The collection of transformed elements, and the final accumulated value. - - - Accumulate the charges, and double them as well - type Charge = - | In of int - | Out of int - - let inputs = seq { In 1; Out 2; In 3 } - - let newCharges, balance = - (0, inputs) ||> Seq.mapFold (fun acc charge -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to seq { In 2; Out 4; In 6 } and balance to 2. - - - - Builds 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. - - A function to transform pairs of items from the input sequences. - The first input sequence. - The second input sequence. - - The result sequence. - - Thrown when either of the input sequences is null. - - - - let inputs1 = ["a"; "bad"; "good"] - let inputs2 = [0; 2; 1] - - (inputs1, inputs2) ||> Seq.map2 (fun x y -> x.[y]) - - Evaluates to a sequence yielding the same results as seq { 'a'; 'd'; 'o' } - - - - Builds 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. - - A function to transform items from the input sequence. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "bbb"; "cc"] - - inputs |> Seq.map (fun x -> x.Length) - - Evaluates to a sequence yielding the same results as seq { 1; 3; 2 } - - - - Returns the length of the sequence - - The input sequence. - - The length of the sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.length - - Evaluates to 3 - - - - Applies 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. The integer passed to the - function indicates the index of element. - - A function to apply to each pair of elements from the input sequences along with their index. - The first input sequence. - The second input sequence. - - Thrown when either of the input sequences is null. - - - - let inputs1 = ["a"; "b"; "c"] - let inputs2 = ["banana"; "pear"; "apple"] - - (inputs1, inputs2) ||> Seq.iteri2 (fun i s1 s2 -> printfn "Index {i}: {s1} - {s2}") - - Evaluates to unit and prints - - Index 0: a - banana - Index 1: b - pear - Index 2: c - apple - - in the console. - - - - Applies 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. - - A function to apply to each pair of elements from the input sequences. - The first input sequence. - The second input sequence. - - Thrown when either of the input sequences is null. - - - - let inputs1 = ["a"; "b"; "c"] - let inputs2 = [1; 2; 3] - - (inputs1, inputs2) ||> Seq.iter2 (printfn "%s: %i") - - Evaluates to unit and prints - - a: 1 - b: 2 - c: 3 - - in the console. - - - - Applies the given function to each element of the collection. The integer passed to the - function indicates the index of element. - - A function to apply to each element of the sequence that can also access the current index. - The input sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.iteri (fun i v -> printfn "{i}: {v}") - - - Evaluates to unit and prints - - 0: a - 1: b - 2: c - - in the console. - - - - Applies the given function to each element of the collection. - - A function to apply to each element of the sequence. - The input sequence. - - Thrown when the input sequence is null. - - - - ["a"; "b"; "c"] |> Seq.iter (printfn "%s") - - Evaluates to unit and prints - - a - b - c - - in the console. - - - - Computes the element at the specified index in the collection. - - The index of the element to retrieve. - The input sequence. - - The element at the specified index of the sequence. - - Thrown when the input sequence is null. - Thrown when the index is negative or the input sequence does not contain enough elements. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.item 1 - - Evaluates to "b" - - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.item 4 - - Throws ArgumentException - - - - Generates 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, that is 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. - Iteration can continue up to Int32.MaxValue. - - A function that generates an item in the sequence from a given index. - - The result sequence. - - - - (+) 5 |> Seq.initInfinite - - Evaluates to a sequence yielding the same results as seq { 5; 6; 7; 8; ... } - - - - Generates a new sequence which, when iterated, will return successive - elements by calling the given function, up to the given count. Each element is saved after its - initialization. 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. - - The maximum number of items to generate for the sequence. - A function that generates an item in the sequence from a given index. - - The result sequence. - - Thrown when count is negative. - - - - Seq.init 4 (fun v -> v + 5) - - Evaluates to a sequence yielding the same results as seq { 5; 6; 7; 8 } - - - - - Seq.init -5 (fun v -> v + 5) - - Throws ArgumentException - - - - Builds a new collection whose elements are the corresponding elements of the input collection - paired with the integer index (from 0) of each element. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - ["a"; "b"; "c"] |> Seq.indexed - - Evaluates to a sequence yielding the same results as seq { (0, "a"); (1, "b"); (2, "c") } - - - - Returns true if the sequence contains no elements, false otherwise. - - The input sequence. - - True if the sequence is empty; false otherwise. - - Thrown when the input sequence is null. - - - - [] |> Seq.isEmpty - - Evaluates to true - - - - - ["pear"; "banana"] |> Seq.isEmpty - - Evaluates to false - - - - Returns the only element of the sequence or None if sequence is empty or contains more than one element. - - The input sequence. - - The only element of the sequence or None. - - Thrown when the input sequence is null. - - - - let inputs = ["banana"] - - inputs |> Seq.tryExactlyOne - - Evaluates to Some banana - - - - - let inputs = ["pear"; "banana"] - - inputs |> Seq.tryExactlyOne - - Evaluates to None - - - - - [] |> Seq.tryExactlyOne - - Evaluates to None - - - - Returns the only element of the sequence. - - The input sequence. - - The only element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input does not have precisely one element. - - - - let inputs = ["banana"] - - inputs |> Seq.exactlyOne - - Evaluates to banana - - - - - let inputs = ["pear"; "banana"] - - inputs |> Seq.exactlyOne - - Throws ArgumentException - - - - - [] |> Seq.exactlyOne - - Throws ArgumentException - - - - Returns the last element of the sequence. - Return None if no such element exists. - - The input sequence. - - The last element of the sequence or None. - - Thrown when the input sequence is null. - - - - ["pear"; "banana"] |> Seq.tryLast - - Evaluates to Some "banana" - - - - - [] |> Seq.tryLast - - Evaluates to None - - - - Returns the last element of the sequence. - - The input sequence. - - The last element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input does not have any elements. - - - - ["pear"; "banana"] |> Seq.last - - Evaluates to banana - - - - - [] |> Seq.last - - Throws ArgumentException - - - - Returns the first element of the sequence, or None if the sequence is empty. - - The input sequence. - - The first element of the sequence or None. - - Thrown when the input sequence is null. - - - - ["banana"; "pear"] |> Seq.tryHead - - Evaluates to Some "banana" - - - - - [] |> Seq.tryHead - - Evaluates to None - - - - Returns the first element of the sequence. - - The input sequence. - - The first element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input does not have any elements. - - - - let inputs = ["banana"; "pear"] - - inputs |> Seq.head - - Evaluates to banana - - - - - [] |> Seq.head - - Throws ArgumentException - - - - Applies a key-generating function to each element of a sequence and yields a sequence of - unique keys. Each unique key contains a sequence of all elements that match - to this key. - - 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. - - A function that transforms an element of the sequence into a comparable key. - The input sequence. - - The result sequence. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.groupBy (fun n -> n % 2) - - Evaluates to a sequence yielding the same results as seq { (1, seq { 1; 3; 5 }); (0, seq { 2; 4 }) } - - - - Tests the all pairs of elements drawn from the two sequences satisfy the - given predicate. If one sequence is shorter than - the other then the remaining elements of the longer sequence are ignored. - - A function to test pairs of elements from the input sequences. - The first input sequence. - The second input sequence. - - True if all pairs satisfy the predicate; false otherwise. - - Thrown when either of the input sequences is null. - - - - let inputs1 = [1; 2; 3; 4; 5; 6] - let inputs2 = [1; 2; 3; 4; 5] - - (inputs1, inputs2) ||> Seq.forall2 (=) - - Evaluates to true. - - - - - let items1 = [2017; 1; 1] - let items2 = [2019; 19; 8] - - (items1, items2) ||> Seq.forall2 (=) - - Evaluates to false. - - - - Tests 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. - - A function to test an element of the input sequence. - The input sequence. - - True if every element of the sequence satisfies the predicate; false otherwise. - - Thrown when the input sequence is null. - - - - let isEven a = a % 2 = 0 - - [2; 42] |> Seq.forall isEven // evaluates to true - - [1; 2] |> Seq.forall isEven // evaluates to false - - - - - Applies a function to corresponding elements of two collections, starting from the end of the shorter collection, - threading an accumulator argument through the computation. The two sequences need not have equal lengths. - If the input function is f and the elements are i0...iN and j0...jM, N < M - then computes f i0 j0 (... (f iN jN s)...). - - The function to update the state given the input elements. - The first input sequence. - The second input sequence. - The initial state. - - The final state value. - - Thrown when the either of the input sequences is null. - - - This function consumes the whole of both inputs sequences before returning the result. As a - result this function should not be used with large or infinite sequences. - - - - - type Count = - { Positive: int - Negative: int - Text: string } - - let inputs1 = [-1; -2; -3] - let inputs2 = [3; 2; 1; 0] - let initialState = {Positive = 0; Negative = 0; Text = ""} - - (inputs1, inputs2, initialState) |||> Seq.foldBack2 (fun a b acc -> - let text = acc.Text + "(" + string a + "," + string b + ") " - if a + b >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text } - ) - - Evaluates to - - { Positive = 2 - Negative = 1 - Text = " (-3,1) (-2,2) (-1,3)" } - - - - - Applies a function to each element of the collection, starting from the end, 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)...) - - The function to update the state given the input elements. - The input sequence. - The initial state. - - The state object after the folding function is applied to each element of the sequence. - - Thrown when the input sequence is null. - - This function consumes the whole input sequence before returning the result. - - - - type Count = - { Positive: int - Negative: int - Text: string } - - let sequence = [1; 0; -1; -2; 3] - let initialState = {Positive = 0; Negative = 0; Text = ""} - - (sequence, initialState) ||> Seq.foldBack (fun a acc -> - let text = acc.Text + " " + string a - if a >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text }) - - Evaluates to - - { Positive = 2 - Negative = 3 - Text = " 3 -2 -1 0 1" } - - - - - Applies a function to corresponding elements of two collections, threading an accumulator argument - through the computation. - - The two sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other sequence are ignored. - If the input function is f and the elements are i0...iN and j0...jN - then computes f (... (f s i0 j0)...) iN jN. - - The function to update the state given the input elements. - The initial state. - The first input sequence. - The second input sequence. - - The final state value. - - Thrown when the either of the input sequences is null. - - - - type CoinToss = Head | Tails - - let data1 = [Tails; Head; Tails] - let data2 = [Tails; Head; Head] - - (0, data1, data2) |||> Seq.fold2 (fun acc a b -> - match (a, b) with - | Head, Head -> acc + 1 - | Tails, Tails -> acc + 1 - | _ -> acc - 1) - - Evaluates to 1 - - - - Applies a function to each element of the collection, threading an accumulator argument - through the computation. If the input function is f and the elements are i0...iN - then computes f (... (f s i0)...) iN - - A function that updates the state with each element from the sequence. - The initial state. - The input sequence. - - The state object after the folding function is applied to each element of the sequence. - - Thrown when the input sequence is null. - - - - type Charge = - | In of int - | Out of int - - let inputs = [In 1; Out 2; In 3] - - (0, inputs) ||> Seq.fold (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to 2 - - - - Returns the index of the last element for which the given function returns True. - - This function digests the whole initial sequence as soon as it is called. As a - result this function should not be used with large or infinite sequences. - - A function to test whether the index of a particular element should be returned. - The input sequence. - - The index of the last element for which the predicate returns True. - - Thrown if no element returns true when - evaluated by the predicate - Thrown when the input sequence is null - - - - let input = [1; 2; 3; 4; 5] - - input |> Seq.findIndex (fun elm -> elm % 2 = 0) - - Evaluates to 3 - - - - - let input = [1; 2; 3; 4; 5] - - input |> Seq.findIndex (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the index of the first element for which the given function returns True. - - A function to test whether the index of a particular element should be returned. - The input sequence. - - The index of the first element for which the predicate returns True. - - Thrown if no element returns true when - evaluated by the predicate - Thrown when the input sequence is null - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.findIndex (fun elm -> elm % 2 = 0) - - Evaluates to 1 - - - - - let inputs = [1; 2; 3; 4; 5] - inputs |> Seq.findIndex (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the last element for which the given function returns True. - - This function digests the whole initial sequence as soon as it is called. As a - result this function should not be used with large or infinite sequences. - - A function to test whether an item in the sequence should be returned. - The input sequence. - - The last element for which the predicate returns True. - - Thrown if no element returns true when - evaluated by the predicate - Thrown when the input sequence is null - - - - let inputs = [2; 3; 4] - - inputs |> Seq.findBack (fun elm -> elm % 2 = 0) - - Evaluates to 4 - - - - - let inputs = [2; 3; 4] - - inputs |> Seq.findBack (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the first element for which the given function returns True. - - A function to test whether an item in the sequence should be returned. - The input sequence. - - The first element for which the predicate returns True. - - Thrown if no element returns true when - evaluated by the predicate - Thrown when the input sequence is null - - - - let inputs = [1; 2; 3] - - inputs |> Seq.find (fun elm -> elm % 2 = 0) - - Evaluates to 2 - - - - - let inputs = [1; 2; 3] - - inputs |> Seq.find (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns 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. - - A synonym for Seq.filter. - - A function to test whether each item in the input sequence should be included in the output. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - [1; 2; 3; 4] |> Seq.where (fun elm -> elm % 2 = 0) - - Evaluates to a sequence yielding the same results as seq { 2; 4 } - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns "true". This is a synonym for Seq.where. - - 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. - - A function to test whether each item in the input sequence should be included in the output. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [1; 2; 3; 4] - - inputs |> Seq.filter (fun elm -> elm % 2 = 0) - - Evaluates to a sequence yielding the same results as seq { 2; 4 } - - - - Tests 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. - - A function to test each pair of items from the input sequences. - The first input sequence. - The second input sequence. - - True if any result from the predicate is true; false otherwise. - - Thrown when either of the two input sequences is null. - - - - let inputs1 = [1; 2] - let inputs2 = [1; 2; 0] - - (inputs1, inputs2) ||> Seq.exists2 (fun a b -> a > b) - - Evaluates to false - - - - - let inputs1 = [1; 4] - let inputs2 = [1; 3; 5] - - (inputs1, inputs2) ||> Seq.exists2 (fun a b -> a > b) - - Evaluates to true - - - - Tests 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. - - A function to test each item of the input sequence. - The input sequence. - - True if any result from the predicate is true; false otherwise. - - Thrown when the input sequence is null. - - - - let input = [1; 2; 3; 4; 5] - - input |> Seq.exists (fun elm -> elm % 4 = 0) - - Evaluates to true - - - - - let input = [1; 2; 3; 4; 5] - - input |> Seq.exists (fun elm -> elm % 6 = 0) - - Evaluates to false - - - - Returns a new sequence with the distinct elements of the second sequence which do not appear in the first sequence, - using generic hash and equality comparisons to compare values. - - Note that this function returns a sequence that digests the whole of the first input sequence as soon as - the result sequence is iterated. As a result this function should not be used with - large or infinite sequences in the first parameter. The function makes no assumption on the ordering of the first input - sequence. - - A sequence whose elements that also occur in the second sequence will cause those elements to be - removed from the returned sequence. - A sequence whose elements that are not also in first will be returned. - - A sequence that contains the set difference of the elements of two sequences. - - Thrown when either of the two input sequences is null. - - - - let original = [1; 2; 3; 4; 5] - let itemsToExclude = [1; 3; 5] - - original |> Seq.except itemsToExclude - - Evaluates to a sequence yielding the same results as seq { 2; 4 } - - - - Creates an empty sequence. - - An empty sequence. - - - - Seq.empty // Evaluates to seq { } - - - - - Splits the input sequence into at most count chunks. - - 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 maximum number of chunks. - The input sequence. - - The sequence split into chunks. - - Thrown when the input sequence is null. - Thrown when count is not positive. - - This function consumes the whole input sequence before yielding the first element of the result sequence. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.splitInto 3 - - Evaluates to a sequence yielding the same results as seq { [|1; 2|]; [|3; 4|]; [|5|] } - - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.splitInto -1 - - Throws ArgumentException - - - - Returns 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. - - A function transforming the sequence items into comparable keys. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [{Bar = 1 };{Bar = 1}; {Bar = 2}; {Bar = 3}] - - inputs |> Seq.distinctBy (fun foo -> foo.Bar) - - Evaluates to a sequence yielding the same results as seq { { Bar = 1 }; { Bar = 2 }; { Bar = 3 } } - - - - Returns 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. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - [1; 1; 2; 3] |> Seq.distinct - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 } - - - - Returns a sequence that is built from the given delayed specification of a - sequence. - - The input function is evaluated each time an IEnumerator for the sequence - is requested. - - The generating function for the sequence. - The result sequence. - - - - Seq.delay (fun () -> Seq.ofList [1; 2; 3]) - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 }, executing - the generator function every time is consumed. - - - - Applies a key-generating function to each element of a sequence and returns a sequence yielding unique - keys and their number of occurrences 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. - - A function transforming each item of the input sequence into a key to be - compared against the others. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - type Foo = { Bar: string } - - let inputs = [{Bar = "a"}; {Bar = "b"}; {Bar = "a"}] - - inputs |> Seq.countBy (fun foo -> foo.Bar) - - Evaluates to a sequence yielding the same results as seq { ("a", 2); ("b", 1) } - - - - Tests if the sequence contains the specified element. - - The value to locate in the input sequence. - The input sequence. - - True if the input sequence contains the specified element; false otherwise. - - Thrown when the input sequence is null. - - - - [1; 2] |> Seq.contains 2 // evaluates to true - [1; 2] |> Seq.contains 5 // evaluates to false - - - - - Combines 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. - - The input enumeration-of-enumerations. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [[1; 2]; [3]; [4; 5]] - - inputs |> Seq.concat - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3; 4; 5 } - - - - Compares two sequences using the given comparison function, element by element. - - A function that takes an element from each sequence and returns an int. - If it evaluates to a non-zero value iteration is stopped and that value is returned. - The first input sequence. - The second input sequence. - - Returns the first non-zero result from the comparison function. If the end of a sequence - is reached it returns a -1 if the first sequence is shorter and a 1 if the second sequence - is shorter. - - Thrown when either of the input sequences - is null. - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 10] - let input2 = [1; 10] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to 0 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 5] - let input2 = [1; 8] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to -1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 11] - let input2 = [1; 13] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 2] - let input2 = [1] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1] - let input2 = [1; 2] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to -1 - - - - Applies the given function to each element of the sequence and concatenates all the - results. - - Remember sequence is lazy, effects are delayed until it is enumerated. - - A function to transform elements of the input sequence into the sequences - that will then be concatenated. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - type Foo = { Bar: int seq } - - let input = seq { {Bar = [1; 2]}; {Bar = [3; 4]} } - - input |> Seq.collect (fun foo -> foo.Bar) - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3; 4 } - - - - - let input = [[1; 2]; [3; 4]] - - input |> Seq.collect id - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3; 4 } - - - - Divides the input sequence into chunks of size at most chunkSize. - - The maximum size of each chunk. - The input sequence. - - The sequence divided into chunks. - - Thrown when the input sequence is null. - Thrown when chunkSize is not positive. - - - - [1; 2; 3] |> Seq.chunkBySize 2 - - Evaluates to a sequence yielding the same results as seq { [|1; 2|]; [|3|] } - - - - - [1; 2; 3] |> Seq.chunkBySize -2 - - Throws ArgumentException - - - - Applies the given function to each element of the sequence. Returns - a sequence 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. - - A function to transform items of type T into options of type U. - The input sequence of type T. - - The result sequence. - - Thrown when the input sequence is null. - - - - [Some 1; None; Some 2] |> Seq.choose id - - Evaluates to a sequence yielding the same results as seq { 1; 2 } - - - - - [1; 2; 3] |> Seq.choose (fun n -> if n % 2 = 0 then Some n else None) - - Evaluates to a sequence yielding the same results as seq { 2 } - - - - Wraps 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. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - [box 1; box 2; box 3] |> Seq.cast<int> - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 }, explicitly typed as seq<int>. - - - - Returns a sequence that corresponds to a cached version of the input sequence. - - - The 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. Caching a sequence is typically useful when repeatedly - evaluating items in the original sequence is computationally expensive or if - iterating the sequence causes side-effects that the user does not want to be - repeated multiple times. - - 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. - - 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. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let fibSeq =(0, 1) |> Seq.unfold (fun (a,b) -> Some(a + b, (b, a + b))) - - let fibSeq3 = fibSeq |> Seq.take 3 |> Seq.cache - fibSeq3 - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 }, - and it will not do the calculation again when called. - - - - Returns 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. - - A function applied to transform each element of the sequence. - The input sequence. - - The average. - - Thrown when the input sequence is null. - Thrown when the input sequence has zero elements. - - - - type Foo = { Bar: float } - - let input = seq { {Bar = 2.0}; {Bar = 4.0} } - - input |> Seq.averageBy (fun foo -> foo.Bar) - - Evaluates to 3.0 - - - - - type Foo = { Bar: float } - - Seq.empty |> Seq.averageBy (fun (foo: Foo) -> foo.Bar) - - Throws ArgumentException - - - - Returns 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. - - The input sequence. - - The average. - - Thrown when the input sequence is null. - Thrown when the input sequence has zero elements. - - - - [1.0; 2.0; 3.0] |> Seq.average - - Evaluates to 2.0 - - - - - [] |> Seq.average - - Throws ArgumentException - - - - Wraps the two given 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. - - The first sequence. - The second sequence. - - The result sequence. - - Thrown when either of the two provided sequences is - null. - - - - Seq.append [1; 2] [3; 4] - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3; 4 } - - - - Returns a new sequence that contains all pairings of elements from the first and second sequences. - - The first sequence. - The second sequence. - - The result sequence. - - Thrown when either of the input sequences is null. - - - - ([1; 2], [3; 4]) ||> Seq.allPairs - - Evaluates to a sequence yielding the same results as - - seq { (1, 3); (1, 4); (2, 3); (2, 4) } - - - - - Contains operations for working with values of type . - - - Return a new list with new items inserted before the given index. - - The index where the items should be inserted. - The values to insert. - The input list. - - The result list. - - Thrown when index is below 0 or greater than source.Length. - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.insertManyAt 1 [ 8; 9 ] - Evaluates to [ 0; 8; 9; 1; 2 ]. - - - - - Return a new list with a new item inserted before the given index. - - The index where the item should be inserted. - The value to insert. - The input list. - - The result list. - - Thrown when index is below 0 or greater than source.Length. - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.insertAt 1 9 - - Evaluates to [ 0; 9; 1; 2 ]. - - - - Return a new list with the item at a given index set to the new value. - - The index of the item to be replaced. - The new value. - The input list. - - The result list. - - Thrown when index is outside 0..source.Length - 1 - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.updateAt 1 9 - - Evaluates to [ 0; 9; 2 ]. - - - - Return a new list with the number of items starting at a given index removed. - - The index of the item to be removed. - The number of items to remove. - The input list. - - The result list. - - Thrown when index is outside 0..source.Length - count - - - - let inputs = [ 0; 1; 2; 3 ] - - inputs |> List.removeManyAt 1 2 - - Evaluates to [ 0; 3 ]. - - - - Return a new list with the item at a given index removed. - - The index of the item to be removed. - The input list. - - The result list. - - Thrown when index is outside 0..source.Length - 1 - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.removeAt 1 - - let inputs = [ 0; 2 ] - - - - Combines the three lists into a list of triples. The lists must have equal lengths. - - The first input list. - The second input list. - The third input list. - - A single list containing triples of matching elements from the input lists. - - - - let numbers = [1; 2] - let names = ["one"; "two"] - let roman = ["I"; "II"] - - List.zip3 numbers names roman - - Evaluates to [(1, "one", "I"); (2, "two", "II")]. - - - - Combines the two lists into a list of pairs. The two lists must have equal lengths. - - The first input list. - The second input list. - - A single list containing pairs of matching elements from the input lists. - - - - let numbers = [1; 2] - let names = ["one"; "two"] - - List.zip numbers names - - Evaluates to [(1, "one"); (2, "two")]. - - - - Returns a list of sliding windows containing elements drawn from the input - list. Each window is returned as a fresh list. - - The number of elements in each window. - The input list. - - The result list. - - Thrown when windowSize is not positive. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.windowed 3 - - Evaluates to [[1; 2; 3]; [2; 3; 4]; [3; 4; 5]] - - - - Returns a new list containing only the elements of the list - for which the given predicate returns "true" - - The function to test the input elements. - The input list. - - A list containing only the elements that satisfy the predicate. - - This is identical to List.filter. - - Select only the even numbers: - - let inputs = [1; 2; 3; 4] - - inputs |> List.where (fun elm -> elm % 2 = 0) - - Evaluates to [2; 4] - - - - Splits a list of triples into three lists. - - The input list. - - Three lists of split elements. - - - - let inputs = [(1, "one", "I"); (2, "two", "II")] - - let numbers, names, roman = inputs |> List.unzip3 - - Evaluates numbers to [1; 2], names to ["one"; "two"] and roman to ["I"; "II"]. - - - - Splits a list of pairs into two lists. - - The input list. - - Two lists of split elements. - - - - let inputs = [(1, "one"); (2, "two")] - - let numbers, names = inputs |> List.unzip - - Evaluates numbers to [1; 2] and names to ["one"; "two"]. - - - - Returns a list that contains the elements generated by the given computation. - The generator is repeatedly called to build the list until it returns None. - The given initial state argument is passed to the element generator. - - A function that takes in the current state and returns an option tuple of the next - element of the list and the next state value. - The initial state value. - - The result list. - - - - 1 |> List.unfold (fun state -> if state > 100 then None else Some (state, state * 2)) - - Evaluates to [1; 2; 4; 8; 16; 32; 64] - - - - Returns the index of the last element in the list - that satisfies the given predicate. - Return None if no such element exists. - - The function to test the input elements. - The input list. - - The index of the last element for which the predicate returns true, or None if - every element evaluates to false. - - Try to find the index of the first even number from the back: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 3 - - - Try to find the index of the first even number from the back: - - let inputs = [1; 3; 5; 7] - - inputs |> List.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Tries to find the nth element in the list. - Returns None if index is negative or the list does not contain enough elements. - - The index to retrieve. - The input list. - - The value at the given index or None. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> List.tryItem 1 - - Evaluates to Some "b". - - - - - let inputs = ["a"; "b"; "c"] - - inputs |> List.tryItem 4 - - Evaluates to None. - - - - Returns the index of the first element in the list - that satisfies the given predicate. - Return None if no such element exists. - - The function to test the input elements. - The input list. - - The index of the first element for which the predicate returns true, or None if - every element evaluates to false. - - Try to find the index of the first even number: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to Some 1 - - - Try to find the index of the first even number: - - let inputs = [1; 3; 5; 7] - - inputs |> List.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the last element for which the given function returns True. - Return None if no such element exists. - - The function to test the input elements. - The input list. - - The last element for which the predicate returns true, or None if - every element evaluates to false. - - Try to find the first even number from the back: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 4 - - - Try to find the first even number from the back: - - let inputs = [1; 5; 3] - - inputs |> List.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the first element for which the given function returns True. - Return None if no such element exists. - - The function to test the input elements. - The input list. - - The first element for which the predicate returns true, or None if - every element evaluates to false. - - Try to find the first even number: - - let inputs = [1; 2; 3] - - inputs |> List.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to Some 2 - - - Try to find the first even number: - - let inputs = [1; 5; 3] - - inputs |> List.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Applies 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. - - The function to generate options from the elements. - The input list. - - The first resulting value or None. - - - - let input = [1; 2; 3] - - input |> List.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to Some "2". - - - - - let input = [1; 2; 3] - - input |> List.tryPick (fun n -> if n > 3 then Some (string n) else None) - - Evaluates to None. - - - - - Returns at most N elements in a new list. - - The maximum number of items to return. - The input list. - - The result list. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.truncate 2 - - Evaluates to ["a"; "b"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.truncate 6 - - Evaluates to ["a"; "b"; "c"; "d"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.truncate 0 - - Evaluates to the empty list. - - - - Returns the transpose of the given sequence of lists. - - The input sequence of list. - - The transposed list. - - Thrown when the input sequence is null. - Thrown when the input lists differ in length. - - - - let inputs = - [ [ 10; 20; 30 ] - [ 11; 21; 31 ] ] - - inputs |> List.transpose - - Evaluates to [ [10; 11]; [20; 21]; [30; 31] ]. - - - - Returns the first element of the list, or - None if the list is empty. - - The input list. - - The first element of the list or None. - - - - let inputs = [ "banana"; "pear" ] - - inputs |> List.tryHead - - Evaluates to Some "banana" - - - - - let inputs : int list = [] - - inputs |> List.tryHead - - Evaluates to None - - - - Views the given list as a sequence. - - The input list. - - The sequence of elements in the list. - - - - let inputs = [ 1; 2; 5 ] - - inputs |> List.toSeq - - Evaluates to seq { 1; 2; 5 }. - - - - Builds an array from the given list. - - The input list. - - The array containing the elements of the list. - - - - let inputs = [ 1; 2; 5 ] - - inputs |> List.toArray - - Evaluates to [| 1; 2; 5 |]. - - - - Returns a list that contains all elements of the original list while the - given predicate returns True, and then returns no further elements. - - A function that evaluates to false when no more items should be returned. - The input list. - - The result list. - - - - let inputs = ["a"; "bb"; "ccc"; "d"] - - inputs |> List.takeWhile (fun x -> x.Length < 3) - - Evaluates to ["a"; "bb"] - - - - Returns the first N elements of the list. - Throws InvalidOperationException - if the count exceeds the number of elements in the list. List.truncate - returns as many items as the list contains instead of throwing an exception. - - The number of items to take. - The input list. - - The result list. - - Thrown when the input list is empty. - Thrown when count exceeds the number of elements - in the list. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.take 2 - - Evaluates to ["a"; "b"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.take 6 - - Throws InvalidOperationException. - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.take 0 - - Evaluates to the empty list. - - - - Returns the list after removing the first element. - - The input list. - - Thrown when the list is empty. - - The list after removing the first element. - - - - let inputs = ["a"; "bb"; "ccc"] - - inputs |> List.tail - - Evaluates to ["bb"; "ccc"] - - - - - Returns the sum of the results generated by applying the function to each element of the list. - - The function to transform the list elements into the type to be summed. - The input list. - - The resulting sum. - - - - let input = [ "aa"; "bbb"; "cc" ] - - input |> List.sumBy (fun s -> s.Length) - - Evaluates to 7. - - - - Returns the sum of the elements in the list. - - The input list. - - The resulting sum. - - - - let input = [ 1; 5; 3; 2 ] - - input |> List.sum - - Evaluates to 11. - - - - Sorts the given list in descending order using . - - This is a stable sort, i.e. the original order of equal elements is preserved. - The input list. - - The sorted list. - - - - let input = [8; 4; 3; 1; 6; 1] - - input |> List.sortDescending - - Evaluates to [8; 6; 4; 3; 1; 1]. - - - - Sorts the given list in descending order using keys given by the given projection. Keys are compared using . - - This is a stable sort, i.e. the original order of equal elements is preserved. - The function to transform the list elements into the type to be compared. - The input list. - - The sorted list. - - - - let input = ["a"; "bbb"; "cccc"; "dd"] - - input |> List.sortByDescending (fun s -> s.Length) - - Evaluates to ["cccc"; "bbb"; "dd"; "a"]. - - - - Splits a list into two lists, at the given index. - - The index at which the list is split. - The input list. - - The two split lists. - - Thrown when split index exceeds the number of elements - in the list. - - - - let input = [8; 4; 3; 1; 6; 1] - - let front, back = input |> List.splitAt 3 - - Evaluates front to [8; 4; 3] and back to [1; 6; 1]. - - - - Sorts the given list using . - - This is a stable sort, i.e. the original order of equal elements is preserved. - The input list. - - The sorted list. - - - - let input = [8; 4; 3; 1; 6; 1] - - List.sort input - - Evaluates to [1; 1 3; 4; 6; 8]. - - - - Sorts the given list using keys given by the given projection. Keys are compared using . - - This is a stable sort, i.e. the original order of equal elements is preserved. - The function to transform the list elements into the type to be compared. - The input list. - - The sorted list. - - - - let input = [ "a"; "bbb"; "cccc"; "dd" ] - - input |> List.sortBy (fun s -> s.Length) - - Evaluates to ["a"; "dd"; "bbb"; "cccc"]. - - - - Sorts the given list using the given comparison function. - - This is a stable sort, i.e. the original order of equal elements is preserved. - The function to compare the list elements. - The input list. - - The sorted list. - - Sort a list of pairs using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let input = [ (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") ] - - input |> List.sortWith compareEntries - - Evaluates to [(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")]. - - - - Bypasses elements in a list while the given predicate returns True, and then returns - the remaining elements of the list. - - A function that evaluates an element of the list to a boolean value. - The input list. - - The result list. - - - - let inputs = ["a"; "bbb"; "cc"; "d"] - - inputs |> List.skipWhile (fun x -> x.Length < 3) - - Evaluates to ["bbb"; "cc"; "d"] - - - - - Returns the list after removing the first N elements. - - The number of elements to skip. If the number is 0 or negative the input list is returned. - The input list. - - The list after removing the first N elements. - - Thrown when count exceeds the number of - elements in the list. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.skip 2 - - Evaluates to ["c"; "d"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.skip 5 - - Throws ArgumentException. - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.skip -1 - - Evaluates to ["a"; "b"; "c"; "d"]. - - - - Returns a list that contains one item only. - - The input item. - - The result list of one item. - - - - List.singleton 7 - - Evaluates to [ 7 ]. - - - - Like foldBack, but returns both the intermediary and final results - - The function to update the state given the input elements. - The input list. - The initial state. - - The list of states. - - Apply a list charges from back to front, and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [ In 1; Out 2; In 3 ] - - (inputs, 0) ||> List.scanBack (fun charge acc -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to [2; 1; 3; 0] by processing each input from back to front. Note 0 is the initial - state, 3 the next state, 1 the next state, and 2 the final state, and the states - are produced from back to front. - Note acc is a commonly used abbreviation for "accumulator". - - - - Applies 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. Returns the list of intermediate results and the final result. - - The function to update the state given the input elements. - The initial state. - The input list. - - The list of states. - - Apply a list charges and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [In 1; Out 2; In 3] - - (0, inputs) ||> List.scan (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to [0; 1; -1; 2]. Note 0 is the initial - state, 1 the next state, -1 the next state, and 2 the final state. - Note acc is a commonly used abbreviation for "accumulator". - - - - Returns a new list with the elements in reverse order. - - The input list. - - The reversed list. - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.rev - - Evaluates to [ 2; 1; 0 ]. - - - - Creates a list by replicating the given initial value. - - The number of elements to replicate. - The value to replicate - - The generated list. - - - - List.replicate 3 "a" - - Evaluates to [ "a"; "a"; "a" ]. - - - - Applies a function to each element of the collection, starting from the end, 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)). - - A function that takes in the next-to-last element of the list and the - current accumulated result to produce the next accumulated result. - The input list. - - Thrown when the list is empty. - - The final result of the reductions. - - - - let inputs = [1; 3; 4; 2] - - inputs |> List.reduceBack (fun a b -> a + b * 10) - - Evaluates to 2431, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10 - - - - 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 if list is empty - - The function to reduce two list elements to a single element. - The input list. - - Thrown when the list is empty. - - The final reduced value. - - - - let inputs = [1; 3; 4; 2] - - inputs |> List.reduce (fun a b -> a * 10 + b) - - Evaluates to 1342, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2 - - - - Returns a list with all elements permuted according to the - specified permutation. - - The function to map input indices to output indices. - The input list. - - The permuted list. - - Thrown when indexMap does not produce a valid permutation. - - - - let inputs = [1; 2; 3; 4] - - inputs |> List.permute (fun x -> (x + 1) % 4) - - Evaluates to [4; 1; 2; 3]. - - - - Applies 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 - - The function to generate options from the elements. - The input list. - - Thrown when the list is empty. - - The first resulting value. - - - - let input = [1; 2; 3] - - input |> List.pick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to "2". - - - - - let input = [1; 2; 3] - - input |> List.pick (fun n -> if n > 3 then Some (string n) else None) - - Throws KeyNotFoundException. - - - - - Splits the collection into two collections, containing the - elements for which the given predicate returns True and False - respectively. Element order is preserved in both of the created lists. - - The function to test the input elements. - The input list. - - A list containing the elements for which the predicate evaluated to true and a list - containing the elements for which the predicate evaluated to false. - - - - let inputs = [1; 2; 3; 4] - - let evens, odds = inputs |> List.partition (fun x -> x % 2 = 0) - - Evaluates evens to [2; 4] and odds to [1; 3]. - - - - Returns a list of each element in the input list and its predecessor, with the - exception of the first element which is only returned as the predecessor of the second element. - - The input list. - - The result list. - - - - let inputs = [1; 2; 3; 4] - - inputs |> List.pairwise - - Evaluates to [(1, 2); (2, 3); (3, 4)]. - - - - Builds a new list from the given enumerable object. - - The input sequence. - - The list of elements from the sequence. - - - - let inputs = seq { 1; 2; 5 } - - inputs |> List.ofSeq - - Evaluates to [ 1; 2; 5 ]. - - - - Builds a list from the given array. - - The input array. - - The list of elements from the array. - - - - let inputs = [| 1; 2; 5 |] - - inputs |> List.ofArray - - Evaluates to [ 1; 2; 5 ]. - - - - Indexes into the list. The first element has index 0. - - The input list. - The index to retrieve. - - The value at the given index. - - Thrown when the index is negative or the input list does not contain enough elements. - - - Returns the lowest of all elements of the list, compared via Operators.min on the function result - - Raises if list is empty. - The function to transform list elements into the type to be compared. - The input list. - - Thrown when the list is empty. - - The minimum value. - - - - let inputs = ["aaa"; "b"; "cccc"] - - inputs |> List.minBy (fun s -> s.Length) - - Evaluates to "b" - - - - - let inputs = [] - - inputs |> List.minBy (fun (s: string) -> s.Length) - - Throws System.ArgumentException. - - - - Returns the lowest of all elements of the list, compared via Operators.min. - - Raises if list is empty - The input list. - - Thrown when the list is empty. - - The minimum value. - - - - let inputs = [10; 12; 11] - - inputs |> List.min - - Evaluates to 10 - - - - - let inputs = [] - - inputs |> List.min - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the list, compared via Operators.max on the function result. - - Raises if list is empty. - The function to transform the list elements into the type to be compared. - The input list. - - Thrown when the list is empty. - - The maximum element. - - - - let inputs = ["aaa"; "b"; "cccc"] - - inputs |> List.maxBy (fun s -> s.Length) - - Evaluates to "cccc" - - - - - let inputs = [] - - inputs |> List.maxBy (fun (s: string) -> s.Length) - - Throws System.ArgumentException. - - - - Return the greatest of all elements of the list, compared via Operators.max. - - Raises if list is empty - The input list. - - Thrown when the list is empty. - - The maximum element. - - - - let inputs = [ 10; 12; 11 ] - - inputs |> List.max - - Evaluates to 12 - - - - - let inputs = [ ] - - inputs |> List.max - - Throws System.ArgumentException. - - - - Like mapi, but mapping corresponding elements from two lists of equal length. - - The function to transform pairs of elements from the two lists and their index. - The first input list. - The second input list. - - The list of transformed elements. - - - - let inputs1 = ["a"; "bad"; "good"] - let inputs2 = [0; 2; 1] - - (inputs1, inputs2) ||> List.mapi2 (fun i x y -> i, x[y]) - - Evaluates to [(0, 'a'); (1, 'd'); (2, 'o')] - - - - Builds 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. - - The function to transform elements and their indices. - The input list. - - The list of transformed elements. - - - - let inputs = [ 10; 10; 10 ] - - inputs |> List.mapi (fun i x -> i + x) - - Evaluates to [ 10; 11; 12 ] - - - - Combines map and foldBack. Builds a new list whose elements are the results of applying the given function - to each of the elements of the input list. The function is also used to accumulate a final value. - - The function to transform elements from the input list and accumulate the final value. - The input list. - The initial state. - - The list of transformed elements, and the final accumulated value. - - Accumulate the charges from back to front, and double them as well - - type Charge = - | In of int - | Out of int - - let charges = [ In 1; Out 2; In 3 ] - - let newCharges, balance = - (charges, 0) ||> List.mapFoldBack (fun charge acc -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to [In 2; Out 4; In 6] and balance to 2. - Note acc is a commonly used abbreviation for "accumulator". - - - - Combines map and fold. Builds a new list whose elements are the results of applying the given function - to each of the elements of the input list. The function is also used to accumulate a final value. - - The function to transform elements from the input list and accumulate the final value. - The initial state. - The input list. - - The list of transformed elements, and the final accumulated value. - - Accumulate the charges, and double them as well - - type Charge = - | In of int - | Out of int - - let inputs = [ In 1; Out 2; In 3 ] - - let newCharges, balance = - (0, inputs) ||> List.mapFold (fun acc charge -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to [In 2; Out 4; In 6] and balance to 2. - Note acc is a commonly used abbreviation for "accumulator". - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding elements of the three collections simultaneously. - - The function to transform triples of elements from the input lists. - The first input list. - The second input list. - The third input list. - - The list of transformed elements. - - - - let inputs1 = [ "a"; "t"; "ti" ] - let inputs2 = [ "l"; "h"; "m" ] - let inputs3 = [ "l"; "e"; "e" ] - - (inputs1, inputs2, inputs3) |||> List.map3 (fun x y z -> x + y + z) - - Evaluates to [ "all"; "the"; "time" ] - - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise. - - The function to transform pairs of elements from the input lists. - The first input list. - The second input list. - - The list of transformed elements. - - - - let inputs1 = ["a"; "bad"; "good"] - let inputs2 = [0; 2; 1] - - (inputs1, inputs2) ||> List.map2 (fun x y -> x.[y]) - - Evaluates to seq ['a'; 'd'; 'o'] - - - - Builds a new collection whose elements are the results of applying the given function - to each of the elements of the collection. - - The function to transform elements from the input list. - The input list. - - The list of transformed elements. - - - - let inputs = [ "a"; "bbb"; "cc" ] - - inputs |> List.map (fun x -> x.Length) - - Evaluates to [ 1; 3; 2 ] - - - - Returns the last element of the list. - Return None if no such element exists. - - The input list. - - The last element of the list or None. - - - - [ "pear"; "banana" ] |> List.tryLast - - Evaluates to Some "banana" - - - - - [ ] |> List.tryLast - - Evaluates to None - - - - Returns the length of the list. - - The input list. - - The length of the list. - - The notation array.Length is preferred. - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.length - - Evaluates to 3 - - - - Returns the last element of the list. - - The input list. - - The last element of the list. - - Thrown when the input does not have any elements. - - - - [ "pear"; "banana" ] |> List.last - - Evaluates to banana - - - - - [ ] |> List.last - - Throws ArgumentException - - - - Applies the given function to two collections simultaneously. The - collections must have identical size. The integer passed to the - function indicates the index of element. - - The function to apply to a pair of elements from the input lists along with their index. - The first input list. - The second input list. - - - - let inputs1 = [ "a"; "b"; "c" ] - let inputs2 = [ "banana"; "pear"; "apple" ] - - (inputs1, inputs2) ||> List.iteri2 (fun i s1 s2 -> printfn "Index %d: %s - %s" i s1 s2) - - Evaluates to unit and prints - - Index 0: a - banana - Index 1: b - pear - Index 2: c - apple - - in the console. - - - - Applies the given function to each element of the collection. The integer passed to the - function indicates the index of element. - - The function to apply to the elements of the list along with their index. - The input list. - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.iteri (fun i v -> printfn "{i}: {v}") - - Evaluates to unit and prints - - 0: a - 1: b - 2: c - - in the console. - - - - Applies the given function to two collections simultaneously. The - collections must have identical size. - - The function to apply to pairs of elements from the input lists. - The first input list. - The second input list. - - - - let inputs1 = [ "a"; "b"; "c" ] - let inputs2 = [ 1; 2; 3 ] - - (inputs1, inputs2) ||> List.iter2 (printfn "%s: %i") - - Evaluates to unit and prints - - a: 1 - b: 2 - c: 3 - - in the console. - - - - Applies the given function to each element of the collection. - - The function to apply to elements from the input list. - The input list. - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.iter (printfn "%s") - - Evaluates to unit and prints - - a - b - c - - in the console. - - - - Indexes into the list. The first element has index 0. - - The index to retrieve. - The input list. - - The value at the given index. - - Thrown when the index is negative or the input list does not contain enough elements. - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.item 1 - - Evaluates to "b" - - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.item 4 - - Throws ArgumentException - - - - Returns true if the list contains no elements, false otherwise. - - The input list. - - True if the list is empty. - - - - [ ] |> List.isEmpty - - Evaluates to true - - - - - [ "pear"; "banana" ] |> List.isEmpty - - Evaluates to false - - - - Creates a list by calling the given generator on each index. - - The length of the list to generate. - The function to generate an element from an index. - - Thrown when the input length is negative. - - The list of generated elements. - - - - List.init 4 (fun v -> v + 5) - - Evaluates to [5; 6; 7; 8] - - - - - List.init -5 (fun v -> v + 5) - - Throws ArgumentException - - - - Returns a new list whose elements are the corresponding elements - of the input list paired with the index (from 0) of each element. - - The input list. - - The list of indexed elements. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> List.indexed - - Evaluates to [(0, "a"); (1, "b"); (2, "c")] - - - - Returns the first element of the list. - - The input list. - - Thrown when the list is empty. - - The first element of the list. - - - - let inputs = ["banana"; "pear"] - - inputs |> List.head - - Evaluates to banana - - - - - [] |> List.head - - Throws ArgumentException - - - - Applies a key-generating function to each element of a list and yields a list of - unique keys. Each unique key contains a list of all elements that match - to this key. - - A function that transforms an element of the list into a comparable key. - The input list. - - The result list. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.groupBy (fun n -> n % 2) - - Evaluates to [(1, [1; 3; 5]); (0, [2; 4])] - - - - Tests 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 exception is raised. - Otherwise, true is returned. - The function to test the input elements. - The first input list. - The second input list. - - Thrown when the input lists differ in length. - - True if all of the pairs of elements satisfy the predicate. - - - - let inputs1 = [1; 2; 3] - let inputs2 = [1; 2; 3] - - (inputs1, inputs2) ||> List.forall2 (=) - - Evaluates to true. - - - - - let items1 = [2017; 1; 1] - let items2 = [2019; 19; 8] - - (items1, items2) ||> List.forall2 (=) - - Evaluates to false. - - - - - let items1 = [1; 2; 3] - let items2 = [1; 2] - - (items1, items2) ||> List.forall2 (=) - - Throws ArgumentException. - - - - Tests 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. - The function to test the input elements. - The input list. - - True if all of the elements satisfy the predicate. - - - - let isEven a = a % 2 = 0 - - [2; 42] |> List.forall isEven // evaluates to true - - [1; 2] |> List.forall isEven // evaluates to false - - - - - Applies 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)). - - The function to update the state given the input elements. - The first input list. - The second input list. - The initial state. - - The final state value. - - - Count the positives, negatives and accumulate some text from back to front: - type Count = - { Positive: int - Negative: int - Text: string } - - let inputs1 = [ -1; -2; -3 ] - let inputs2 = [ 3; 2; 1 ] - let initialState = {Positive = 0; Negative = 0; Text = ""} - - (inputs1, inputs2, initialState) |||> List.foldBack2 (fun a b acc -> - let text = acc.Text + "(" + string a + "," + string b + ") " - if a + b >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text } - ) - - Evaluates to - - { Positive = 2 - Negative = 1 - Text = "(-3,1) (-2,2) (-1,3) " } - - Note acc is a commonly used abbreviation for "accumulator". - - - - Applies a function to each element of the collection, starting from the end, 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)). - - The function to update the state given the input elements. - The input list. - The initial state. - - The state object after the folding function is applied to each element of the list. - - Making the sum of squares for the first 5 natural numbers - - ([1..5], 0) ||> List.foldBack (fun v acc -> acc + v * v) // evaluates 55 - - Note acc is a commonly used abbreviation for "accumulator". - - - Shopping for fruits hungry, you tend to take more of each as the hunger grows - - type Fruit = Apple | Pear | Orange - - type BagItem = { fruit: Fruit; quantity: int } - - let takeMore fruit (previous: BagItem list) = - let toTakeThisTime = - match previous with - | bagItem :: otherBagItems -> bagItem.quantity + 1 - | [] -> 1 - { fruit = fruit; quantity = toTakeThisTime } :: previous - - let input = [ Apple; Pear; Orange ] - - (input, []) ||> List.foldBack takeMore - - Evaluates to - - [{ fruit = Apple; quantity = 3 } - { fruit = Pear; quantity = 2 } - { fruit = Orange; quantity = 1 }] - - - - - Applies 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. - - The function to update the state given the input elements. - The initial state. - The first input list. - The second input list. - - The final state value. - - - Count the number of times the coins match: - type CoinToss = Head | Tails - - let inputs1 = [Tails; Head; Tails] - let inputs2 = [Tails; Head; Head] - - (0, inputs1, inputs2) |||> List.fold2 (fun acc input1 input2 -> - match (input1, input2) with - | Head, Head -> acc + 1 - | Tails, Tails -> acc + 1 - | _ -> acc) - - Evaluates to 1. Note acc is a commonly used abbreviation for "accumulator". - - - - Applies 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. - - The function to update the state given the input elements. - The initial state. - The input list. - - The final state value. - - Making the sum of squares for the first 5 natural numbers - - (0, [1..5]) ||> List.fold (fun s v -> s + v * v) // evaluates 55 - - - - Shopping for fruits hungry, you tend to take more of each as the hunger grows - - type Fruit = Apple | Pear | Orange - - type BagItem = { fruit: Fruit; quantity: int } - - let takeMore (previous: BagItem list) fruit = - let toTakeThisTime = - match previous with - | bagItem :: otherBagItems -> bagItem.quantity + 1 - | [] -> 1 - { fruit = fruit; quantity = toTakeThisTime } :: previous - - let inputs = [ Apple; Pear; Orange ] - - ([], inputs) ||> List.fold takeMore - - Evaluates to - - [{ fruit = Orange; quantity = 3 } - { fruit = Pear; quantity = 2 } - { fruit = Apple; quantity = 1 }] - - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns "true" - - The function to test the input elements. - The input list. - - A list containing only the elements that satisfy the predicate. - - - - let input = [1, "Luke"; 2, "Kirk"; 3, "Kenobi"; 4, "Spock"] - - let isEven x = 0 = x % 2 - - let isComingFromStarTrek (x,_) = isEven x - - input |> List.filter isComingFromStarTrek - - Evaluates to [(2, "Kirk"); (4, "Spock")] - - - - Returns the index of the last element in the list - that satisfies the given predicate. - Raises KeyNotFoundException if no such element exists. - - The function to test the input elements. - The input list. - - Thrown if the predicate evaluates to false for all the - elements of the list. - - The index of the last element that satisfies the predicate. - - - - let isEven x = 0 = x % 2 - - let isGreaterThan x y = y > x - - let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"] - - input |> List.findIndexBack (fun (x,_) -> isEven x) // evaluates 3 - input |> List.findIndexBack (fun (x,_) -> x |> isGreaterThan 6) // raises an exception - - - - - Returns the index of the first element in the list - that satisfies the given predicate. - Raises KeyNotFoundException if no such element exists. - - The function to test the input elements. - The input list. - - Thrown if the predicate evaluates to false for all the - elements of the list. - - The index of the first element that satisfies the predicate. - - - - let isEven x = 0 = x % 2 - - let isGreaterThan x y = y > x - - let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"] - - input |> List.findIndex (fun (x,_) -> isEven x) // evaluates 1 - input |> List.findIndex (fun (x,_) -> x |> isGreaterThan 6) // raises an exception - - - - - Returns the last element for which the given function returns True. - Raises KeyNotFoundException if no such element exists. - - The function to test the input elements. - The input list. - - Thrown if the predicate evaluates to false for - all the elements of the list. - - The last element that satisfies the predicate. - - - - let isEven x = 0 = x % 2 - - let isGreaterThan x y = y > x - - let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"] - - input |> List.findBack (fun (x,_) -> isEven x) // evaluates (4, "Kenobi") - input |> List.findBack (fun (x,_) -> x |> isGreaterThan 6) // raises an exception - - - - - Returns the first element for which the given function returns True. - Raises KeyNotFoundException if no such element exists. - - The function to test the input elements. - The input list. - - Thrown if the predicate evaluates to false for - all the elements of the list. - - The first element that satisfies the predicate. - - - - let isEven x = 0 = x % 2 - - let isGreaterThan x y = y > x - - let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"] - - input |> List.find (fun (x,_) -> isEven x) // evaluates (2, "Kirk") - input |> List.find (fun (x,_) -> x |> isGreaterThan 6) // raises an exception - - - - - Tests 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 exception is raised. - Otherwise, false is returned. - - The function to test the input elements. - The first input list. - The second input list. - - Thrown when the input lists differ in length. - - True if any pair of elements satisfy the predicate. - - Check if the sum of pairs (from 2 different lists) have at least one even number - - let anEvenSum a b = 0 = (a + b) % 2 - - ([1..4], [2..5]) - ||> List.exists2 anEvenSum // evaluates false - - ([1..4], [2;4;5;6]) - ||> List.exists2 anEvenSum // evaluates true - - - - - Tests 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. - The function to test the input elements. - The input list. - - True if any element satisfies the predicate. - - - - let input = [1, "Kirk"; 2, "Spock"; 3, "Kenobi"] - - input |> List.exists (fun x -> x = (3, "Kenobi")) // evaluates true - - input |> List.exists (fun (n, name) -> n > 5) // evaluates false - - - - - Returns the only element of the list or None if it is empty or contains more than one element. - - The input list. - - The only element of the list or None. - - - - [1] |> List.tryExactlyOne // evaluates Some 1 - [1;2] |> List.tryExactlyOne // evaluates None - ([] : int list) |> List.tryExactlyOne // evaluates None - - - - - Returns the only element of the list. - - The input list. - - The only element of the list. - - Thrown when the input does not have precisely one element. - - - - ["the chosen one"] |> List.exactlyOne // evaluates "the chosen one" - - - - - - let input : string list = [] - - input |> List.exactlyOne - - Will throw the exception: System.ArgumentException: The input sequence was empty - - - - - [1..5] |> List.exactlyOne - - Will throw the exception: System.ArgumentException: The input sequence contains more than one element - - - - Returns a new list with the distinct elements of the input list which do not appear in the itemsToExclude sequence, - using generic hash and equality comparisons to compare values. - - A sequence whose elements that also occur in the input list will cause those elements to be - removed from the result. - A list whose elements that are not also in itemsToExclude will be returned. - - A list that contains the distinct elements of list that do not appear in itemsToExclude. - - Thrown when itemsToExclude is null. - - - - let input = [1, "Kirk"; 2, "Spock"; 3, "Kenobi"] - - input |> List.except [3, "Kenobi"] - - Evaluates to [(1, "Kirk"); (2, "Spock")]. - - - - - [0..10] |> List.except [1..5] // evaluates [0; 6; 7; 8; 9; 10] - - - - - - [1..5] |> List.except [0..10] // evaluates [] - - - - - Returns an empty list of the given type. - - - Splits the input list into at most count chunks. - - The maximum number of chunks. - The input list. - - The list split into chunks. - - Thrown when count is not positive. - - - - [1..10] |> List.splitInto 2 - - Evaluates to [[1; 2; 3; 4; 5]; [6; 7; 8; 9; 10]]. - - - - - [1..10] |> List.splitInto 4 - - Evaluates to [[1; 2; 3]; [4; 5; 6]; [7; 8]; [9; 10]]. - - - - Applies a key-generating function to each element of a list and returns a list yielding unique - keys and their number of occurrences in the original list. - - A function transforming each item of the input list into a key to be - compared against the others. - The input list. - - The result list. - - Counting the number of occurrences of chars - - let input = ['H'; 'a'; 'p'; 'p'; 'y'] - - input |> List.countBy id - - Evaluates [('H', 1); ('a', 1); ('p', 2); ('y', 1)] - - - - Returns a list 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 list then the later occurrences are discarded. - - A function transforming the list items into comparable keys. - The input list. - - The result list. - - - - let isEven x = 0 = x % 2 - - let input = [6;1;2;3;1;4;5;5] - - input |> List.distinctBy isEven // evaluates [6; 1] - - - - - Returns a list that contains no duplicate entries according to generic hash and - equality comparisons on the entries. - If an element occurs multiple times in the list then the later occurrences are discarded. - - The input list. - - The result list. - - - - let input = [6;1;2;3;1;4;5;5] - - input |> List.distinct - - Evaluates to [6; 1; 2; 3; 4; 5]. - - - - Tests if the list contains the specified element. - - The value to locate in the input list. - The input list. - - True if the input list contains the specified element; false otherwise. - - - - [1..9] |> List.contains 0 - - Evaluates to false. - - - - - [1..9] |> List.contains 3 - - Evaluates to true. - - - - - let input = [1, "SpongeBob"; 2, "Patrick"; 3, "Squidward"; 4, "Mr. Krabs"] - - input |> List.contains (2, "Patrick") - - Evaluates to true. - - - - - let input = [1, "SpongeBob"; 2, "Patrick"; 3, "Squidward"; 4, "Mr. Krabs"] - - input |> List.contains (22, "Patrick") - - Evaluates to false. - - - - Returns a new list that contains the elements of each the lists in order. - - The input sequence of lists. - - The resulting concatenated list. - - - - let input = [ [1;2] - [3;4;5] - [6;7;8;9] ] - input |> List.concat // evaluates [1; 2; 3; 4; 5; 6; 7; 8; 9] - - - - - Compares two lists using the given comparison function, element by element. - - A function that takes an element from each list and returns an int. - If it evaluates to a non-zero value iteration is stopped and that value is returned. - The first input list. - The second input list. - - Returns the first non-zero result from the comparison function. If the first list has a - larger element, the return value is always positive. If the second list has a larger - element, the return value is always negative. When the elements are equal in the two - lists, 1 is returned if the first list is longer, 0 is returned if they are equal in - length, and -1 is returned when the second list is longer. - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 10] - let input2 = [1; 10] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to 0 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 5] - let input2 = [1; 8] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to -1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 11] - let input2 = [1; 13] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 2] - let input2 = [1] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1] - let input2 = [1; 2] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to -1 - - - - For each element of the list, applies the given function. Concatenates all the results and return the combined list. - - The function to transform each input element into a sublist to be concatenated. - The input list. - - The concatenation of the transformed sublists. - - For each positive number in the array we are generating all the previous positive numbers - - [1..4] |> List.collect (fun x -> [1..x]) - - The sample evaluates to [1; 1; 2; 1; 2; 3; 1; 2; 3; 4] (added extra spaces for easy reading) - - - - Divides the input list into lists (chunks) with at a positive number of at most chunkSize elements. - Returns a new list containing the generated lists (chunks) as its elements. - - Returns an empty list when the input list is empty. - - The maximum size of each chunk. - The input list. - - The list divided into chunks. - - Thrown when chunkSize is not positive. - - - - [ 1..10 ] |> List.chunkBySize 3 - - Evaluates to - - [ [ 1; 2; 3 ] - [ 4; 5; 6 ] - [ 7; 8; 9 ] - [ 10 ] ] - - - - - - [ 1..5 ] |> List.chunkBySize 10 - - Evaluates to - - [ [ 1; 2; 3; 4; 5 ] ] - - - - - Applies a function to each element in a list and then returns - a list of values v where the applied function returned Some(v). - - Returns an empty list when the input list is empty or when the applied chooser function - returns None for all elements. - - - The function to be applied to the list elements. - The input list. - - The resulting list comprising the values v where the chooser function returned Some(x). - - - Using the identity function id (is defined like fun x -> x): - - - let input1 = [ Some 1; None; Some 3; None ] - - input1 |> List.choose id - - Evaluates to - - [ 1; 3 ] - - - - - - type Happiness = - | AlwaysHappy - | MostOfTheTimeGrumpy - - type People = { Name: string; Happiness: Happiness } - - let takeJustHappyPersons person = - match person.Happiness with - | AlwaysHappy -> Some person.Name - | MostOfTheTimeGrumpy -> None - - let candidatesForTheTrip = - [ { Name = "SpongeBob" - Happiness = AlwaysHappy } - { Name = "Patrick" - Happiness = AlwaysHappy } - { Name = "Squidward" - Happiness = MostOfTheTimeGrumpy } ] - - candidatesForTheTrip - |> List.choose takeJustHappyPersons - - Evaluates to - - [ "SpongeBob"; "Patrick" ] - - - - - - let input3: int option list = [] - - input3 |> List.choose id - Evaluates to: - empty list - - - - - - let input4: string option list = [None; None] - - input4 |> List.choose id - Evaluates to - empty list - - - - - Using the identity function id (is defined like fun x -> x): - - - let input5 = [ Some 1; None; Some 3; None ] - - input5 |> List.choose id // evaluates [1; 3] - - - - - - Returns the average of values in a list generated by applying a function to each element of the list. - - The function to transform the list elements into the values to be averaged. - The input list. - - Thrown when the list is empty. - - The resulting average. - - Calculate average age of persons by extracting their age from a record type. - - type People = { Name: string; Age: int } - - let getAgeAsFloat person = float person.Age - - let people = - [ { Name = "Kirk"; Age = 26 } - { Name = "Spock"; Age = 90 } - { Name = "McCoy"; Age = 37 } ] - - people |> List.averageBy getAgeAsFloat - - Evaluates to - - 51.0 - - - - - Returns the average of the values in a non-empty list. - - The input list. - - Thrown when the input list is empty. - - The resulting average. - - - - [1.0 .. 9.0] |> List.average - - Evaluates to - - 5.0 - - - - - Returns a new list that contains the elements of the first list - followed by elements of the second list. - - The first input list. - The second input list. - - The resulting list. - - - - List.append [ 1..3 ] [ 4..7 ] - - [ 4..7 ] |> List.append [ 1..3 ] - - Evaluates to - - [ 1; 2; 3; 4; 5; 6; 7 ] - - - - - Returns a new list that contains all pairings of elements from two lists. - - The first input list. - The second input list. - - The resulting list of pairs. - - - - let people = [ "Kirk"; "Spock"; "McCoy" ] - let numbers = [ 1; 2 ] - - people |> List.allPairs numbers - - Evaluates to - - [ (1, "Kirk"); (1, "Spock"); (1, "McCoy"); (2, "Kirk"); (2, "Spock"); (2, "McCoy") ] - - - - - Contains operations for working with values of type . - - Operations for collections such as lists, arrays, sets, maps and sequences. See also - F# Collection Types in the F# Language Guide. - - - - Return a new array with new items inserted before the given index. - - The index where the items should be inserted. - The values to insert. - The input array. - - The result array. - - Thrown when index is below 0 or greater than source.Length. - - - - let inputs = [| 0; 1; 2 |] - - inputs |> Array.insertManyAt 1 [8; 9] - - Evaluates to [| 0; 8; 9; 1; 2 |]. - - - - Return a new array with a new item inserted before the given index. - - The index where the item should be inserted. - The value to insert. - The input array. - - The result array. - - Thrown when index is below 0 or greater than source.Length. - - - - let inputs = [| 0; 1; 2 |] - - inputs |> Array.insertAt 1 9 - - Evaluates to [| 0; 9; 1; 2 |]. - - - - Return a new array with the item at a given index set to the new value. - - The index of the item to be replaced. - The new value. - The input array. - - The result array. - - Thrown when index is outside 0..source.Length - 1 - - - - let inputs = [| 0; 1; 2 |] - - inputs |> Array.updateAt 1 9 - - Evaluates to [| 0; 9; 2 |]. - - - - Return a new array with the number of items starting at a given index removed. - - The index of the item to be removed. - The number of items to remove. - The input array. - - The result array. - - Thrown when index is outside 0..source.Length - count - - - - let inputs = [| 0; 1; 2; 3 |] - - inputs |> Array.removeManyAt 1 2 - - Evaluates to [| 0; 3 |]. - - - - Return a new array with the item at a given index removed. - - The index of the item to be removed. - The input array. - - The result array. - - Thrown when index is outside 0..source.Length - 1 - - - - let inputs = [| 0; 1; 2 |] - - inputs |> Array.removeAt 1 - - Evaluates to [| 0; 2 |]. - - - - Combines three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is - raised. - - The first input array. - The second input array. - The third input array. - - Thrown when any of the input arrays are null. - Thrown when the input arrays differ in length. - - The array of tupled elements. - - - - let numbers = [| 1; 2 |] - let names = [| "one"; "two" |] - let roman = [| "I"; "II" |] - - Array.zip3 numbers names roman - - Evaluates to [|(1, "one", "I"); (2, "two", "II")|]. - - - - Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - raised. - - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The array of tupled elements. - - - - let numbers = [|1; 2|] - let names = [|"one"; "two"|] - - Array.zip numbers names - - Evaluates to [| (1, "one"); (2, "two") |]. - - - - Returns an array of sliding windows containing elements drawn from the input - array. Each window is returned as a fresh array. - - The number of elements in each window. - The input array. - - The result array. - - Thrown when the input array is null. - Thrown when windowSize is not positive. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.windowed 3 - - Evaluates to [|[|1; 2; 3|]; [|2; 3; 4|]; [|3; 4; 5|]|] - - - - Returns a new array containing only the elements of the array - for which the given predicate returns "true". - - The function to test the input elements. - The input array. - - An array containing the elements for which the given predicate returns true. - - Thrown when the input array is null. - - This is identical to Array.filter. - - Select only the even numbers: - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.where (fun elm -> elm % 2 = 0) - - Evaluates to [| 2; 4 |] - - - - Splits an array of triples into three arrays. - - The input array. - - The tuple of three arrays. - - Thrown when the input array is null. - - - - let inputs = [| (1, "one", "I"); (2, "two", "II") |] - - let numbers, names, roman = inputs |> Array.unzip3 - - Evaluates numbers to [|1; 2|], names to [|"one"; "two"|] and roman to [|"I"; "II"|]. - - - - Splits an array of pairs into two arrays. - - The input array. - - The two arrays. - - Thrown when the input array is null. - - - - let inputs = [| (1, "one"); (2, "two") |] - - let numbers, names = inputs |> Array.unzip - - Evaluates numbers to [|1; 2|] and names to [|"one"; "two"|]. - - - - Returns an array that contains the elements generated by the given computation. - The generator is repeatedly called to build the list until it returns `None`. - The given initial state argument is passed to the element generator. - - A function that takes in the current state and returns an option tuple of the next - element of the array and the next state value. - The initial state value. - - The result array. - - - - 1 |> Array.unfold (fun state -> if state > 100 then None else Some (state, state * 2)) - - Evaluates to [| 1; 2; 4; 8; 16; 32; 64 |] - - - - Returns the index of the last element in the array - that satisfies the given predicate. - - The function to test the input elements. - The input array. - - Thrown when the input array is null. - - The index of the last element that satisfies the predicate, or None. - - Try to find the index of the first even number from the back: - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 3 - - - Try to find the index of the first even number from the back: - - let inputs = [| 1; 3; 5; 7 |] - - inputs |> Array.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Tries to find the nth element in the array. - Returns None if index is negative or the input array does not contain enough elements. - - The index of element to retrieve. - The input array. - - The nth element of the array or None. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.tryItem 1 - - Evaluates to Some "b". - - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.tryItem 4 - - Evaluates to None. - - - - Returns the index of the first element in the array - that satisfies the given predicate. - - The function to test the input elements. - The input array. - - Thrown when the input array is null. - - The index of the first element that satisfies the predicate, or None. - - Try to find the index of the first even number: - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to Some 1 - - - Try to find the index of the first even number: - - let inputs = [| 1; 3; 5; 7 |] - - inputs |> Array.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the last element for which the given function returns True. - Return None if no such element exists. - - The function to test the input elements. - The input array. - - Thrown when the input array is null. - - The last element that satisfies the predicate, or None. - - Try to find the first even number from the back: - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 4 - - - Try to find the first even number from the back: - - let inputs = [| 1; 5; 3 |] - - inputs |> Array.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the first element for which the given function returns True. - Return None if no such element exists. - - The function to test the input elements. - The input array. - - The first element that satisfies the predicate, or None. - - Thrown when the input array is null. - - Try to find the first even number: - - let inputs = [| 1; 2; 3 |] - - inputs |> Array.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to Some 2 - - - Try to find the first even number: - - let inputs = [| 1; 5; 3 |] - - inputs |> Array.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns at most N elements in a new array. - - The maximum number of items to return. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.truncate 2 - - Evaluates to [| "a"; "b" |] - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.truncate 6 - - Evaluates to [| "a"; "b"; "c"; "d" |] - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.truncate 0 - - Evaluates to [| |]. - - - - Returns the transpose of the given sequence of arrays. - - The input sequence of arrays. - - The transposed array. - - Thrown when the input sequence is null. - Thrown when the input arrays differ in length. - - - - let inputs = - [| [| 10; 20; 30 |] - [| 11; 21; 31 |] |] - - inputs |> Array.transpose - - Evaluates to [|[|10; 11|]; [|20; 21|]; [|30; 31|]|]. - - - - Views the given array as a sequence. - - The input array. - - The sequence of array elements. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 5 |] - - inputs |> Array.toSeq - - Evaluates to seq { 1; 2; 5 }. - - - - Builds a list from the given array. - - The input array. - - The list of array elements. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 5 |] - - inputs |> Array.toList - - Evaluates to [ 1; 2; 5 ]. - - - - Returns a new array containing the elements of the original except the first element. - - The input array. - - Thrown when the array is empty. - Thrown when the input array is null. - - A new array containing the elements of the original except the first element. - - - - let inputs = [| "a"; "bb"; "ccc" |] - - inputs |> Array.tail - - Evaluates to [| "bb"; "ccc" |] - - - - - Returns an array that contains all elements of the original array while the - given predicate returns True, and then returns no further elements. - - A function that evaluates to false when no more items should be returned. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "bb"; "ccc"; "d" |] - - inputs |> Array.takeWhile (fun x -> x.Length < 3) - - Evaluates to [| "a"; "bb" |] - - - - - Returns the first N elements of the array. - Throws InvalidOperationException - if the count exceeds the number of elements in the array. Array.truncate - returns as many items as the array contains instead of throwing an exception. - - The number of items to take. - The input array. - - The result array. - - Thrown when the input array is null. - Thrown when the input array is empty. - Thrown when count exceeds the number of elements - in the list. - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.take 2 - - Evaluates to [| "a"; "b" |] - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.take 6 - - Throws InvalidOperationException. - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.take 0 - - Evaluates to [| |]. - - - - Returns the sum of the results generated by applying the function to each element of the array. - - The function to transform the array elements into the type to be summed. - The input array. - - The resulting sum. - - Thrown when the input array is null. - - - - let input = [| "aa"; "bbb"; "cc" |] - - input |> Array.sumBy (fun s -> s.Length) - - Evaluates to 7. - - - - Returns the sum of the elements in the array. - - The input array. - - The resulting sum. - - Thrown when the input array is null. - - - - let input = [| 1; 5; 3; 2 |] - - input |> Array.sum - - Evaluates to 11. - - - - Sorts the elements of an array, in descending order, using the given projection for the keys and returning a new array. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - The sorted array. - - - - let input = [| "a"; "bbb"; "cccc"; "dd" |] - - input |> Array.sortByDescending (fun s -> s.Length) - - Evaluates to [|"cccc"; "bbb"; "dd"; "a"|]. - - - - Sorts the elements of an array, in descending order, returning a new array. Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The input array. - - The sorted array. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - input |> Array.sortDescending - - Evaluates to [| 8; 6; 4; 3; 1; 1 |]. - - - - Splits an array into two arrays, at the given index. - - The index at which the array is split. - The input array. - - The two split arrays. - - Thrown when the input array is null. - Thrown when split index exceeds the number of elements - in the array. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - let front, back = input |> Array.splitAt 3 - - Evaluates front to [|8; 4; 3|] and back to [|1; 6; 1|]. - - - - Sorts the elements of an array by mutating the array in-place, using the given comparison function. - Elements are compared using . - - The input array. - - Thrown when the input array is null. - - - - let array = [| 8; 4; 3; 1; 6; 1 |] - - Array.sortInPlace array - - After evaluation array contains [| 1; 1; 3; 4; 6; 8 |]. - - - - Sorts the elements of an array by mutating the array in-place, using the given comparison function as the order. - - The function to compare pairs of array elements. - The input array. - - Thrown when the input array is null. - - The following sorts entries using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let array = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |] - - array |> Array.sortInPlaceWith compareEntries - - After evaluation array contains [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. - - - - Sorts the elements of an array by mutating the array in-place, using the given projection for the keys. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - Thrown when the input array is null. - - - - let array = [| "a"; "bbb"; "cccc"; "dd" |] - - array |> Array.sortInPlaceBy (fun s -> s.Length) - - After evaluation array contains [|"a"; "dd"; "bbb"; "cccc"|]. - - - - Sorts the elements of an array, using the given comparison function as the order, returning a new array. - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to compare pairs of array elements. - The input array. - - The sorted array. - - Thrown when the input array is null. - - Sort an array of pairs using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let input = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |] - - input |> Array.sortWith compareEntries - - Evaluates to [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. - - - - Sorts the elements of an array, using the given projection for the keys and returning a new array. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - The sorted array. - - Thrown when the input array is null. - - - - let input = [| "a"; "bbb"; "cccc"; "dd" |] - - input |> Array.sortBy (fun s -> s.Length) - - Evaluates to [|"a"; "dd"; "bbb"; "cccc"|]. - - - - Sorts the elements of an array, returning a new array. Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The input array. - - The sorted array. - - Thrown when the input array is null. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - Array.sort input - - Evaluates to [| 1; 1; 3; 4; 6; 8 |]. - - - - Builds a new array that contains the given subrange specified by - starting index and length. - - The input array. - The index of the first element of the sub array. - The length of the sub array. - - The created sub array. - - Thrown when the input array is null. - Thrown when either startIndex or count is negative, - or when there aren't enough elements in the input array. - - - Slicing syntax is generally preferred, e.g. - - let input = [| 0; 1; 2; 3; 4; 5 |] - - input.[2..4] - - - - - - let input = [| 0; 1; 2; 3; 4; 5 |] - - Array.sub input 2 3 - - Evaluates to [| 2; 3; 4 |]. - - - - Bypasses elements in an array while the given predicate returns True, and then returns - the remaining elements in a new array. - - A function that evaluates an element of the array to a boolean value. - The input array. - - The created sub array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "bbb"; "cc"; "d" |] - - inputs |> Array.skipWhile (fun x -> x.Length < 3) - - Evaluates to [|"bbb"; "cc"; "d"|] - - - - - Builds a new array that contains the elements of the given array, excluding the first N elements. - - The number of elements to skip. If negative the full array will be returned as a copy. - The input array. - - A copy of the input array, after removing the first N elements. - - Thrown when the input array is null. - Thrown when count exceeds the number of - elements in the array. - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.skip 2 - - Evaluates to [| "c"; "d" |] - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.skip 5 - - Throws ArgumentException. - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.skip -1 - - Evaluates to [| "a"; "b"; "c"; "d" |]. - - - - Sets an element of an array. - - The input array. - The input index. - The input value. - - Thrown when the input array is null. - Thrown when the index is negative or the input array does not contain enough elements. - - - - let inputs = [| "a"; "b"; "c" |] - - Array.set inputs 1 "B" - - After evaluation inputs contains [| "a"; "B"; "c" |] - - - - - let inputs = [| "a"; "b"; "c" |] - - Array.set inputs 4 "d" - - Throws IndexOutOfRangeException - - - - Returns an array that contains one item only. - - The input item. - - The result array of one item. - - - - Array.singleton 7 - - Evaluates to [| 7 |]. - - - - Like foldBack, but return both the intermediary and final results. - - The function to update the state given the input elements. - The input array. - The initial state. - - The array of state values. - - Thrown when the input array is null. - - Apply a list charges from back to front, and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - (inputs, 0) ||> Array.scanBack (fun charge acc -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to [|2; 1; 3; 0|] by processing each input from back to front. Note 0 is the intial - state, 3 the next state, 1 the next state, and 2 the final state. - - - - Like fold, but return the intermediary and final results. - - The function to update the state given the input elements. - The initial state. - The input array. - - The array of state values. - - Thrown when the input array is null. - - Apply a list charges and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - (0, inputs) ||> Array.scan (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to [|0; 1; -1; 2|]. Note 0 is the intial - state, 1 the next state, -1 the next state, and 2 the final state. - - - - Returns a new array with the elements in reverse order. - - The input array. - - The reversed array. - - Thrown when the input array is null. - - - - Array.rev [| 0; 1; 2 |] - - Evaluates to [| 2; 1; 0 |]. - - - - Creates an array by replicating the given initial value. - - The number of elements to replicate. - The value to replicate - - The generated array. - - Thrown when count is negative. - - - - Array.replicate 3 "a" - - Evaluates to [| "a"; "a"; "a" |]. - - - - Applies a function to each element of the array, starting from the end, 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)). - - A function that takes in the next-to-last element of the list and the - current accumulated result to produce the next accumulated result. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The final result of the reductions. - - - - let inputs = [| 1; 3; 4; 2 |] - - inputs |> Array.reduceBack (fun a b -> a + b * 10) - - Evaluates to 2431, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10 - - - - Applies a function to each element of the array, threading an accumulator argument - through the computation. If the input function is f and the elements are i0...iN - then computes f (... (f i0 i1)...) iN. - Raises ArgumentException if the array has size zero. - - The function to reduce a pair of elements to a single element. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The final result of the reductions. - - - - let inputs = [| 1; 3; 4; 2 |] - - inputs |> Array.reduce (fun a b -> a * 10 + b) - - Evaluates to 1342, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2 - - - - Returns an array with all elements permuted according to the - specified permutation. - - The function that maps input indices to output indices. - The input array. - - The output array. - - Thrown when the input array is null. - Thrown when indexMap does not produce a valid permutation. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.permute (fun x -> (x + 1) % 4) - - Evaluates to [|4; 1; 2; 3|]. - - - - Splits the collection into two collections, containing the - elements for which the given predicate returns "true" and "false" - respectively. - - The function to test the input elements. - The input array. - - A pair of arrays. The first containing the elements the predicate evaluated to true, - and the second containing those evaluated to false. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.partition (fun x -> x % 2 = 0) - - Evaluates to ([|2; 4|], [|1; 3|]). - - - - Returns an array of each element in the input array and its predecessor, with the - exception of the first element which is only returned as the predecessor of the second element. - - The input array. - - The result array. - - Thrown when the input sequence is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.pairwise - - Evaluates to [|(1, 2); (2, 3); (3, 4)|]. - - - - Builds a new array from the given enumerable object. - - The input sequence. - - The array of elements from the sequence. - - Thrown when the input sequence is null. - - - - let inputs = seq { 1; 2; 5 } - - inputs |> Array.ofSeq - - Evaluates to [| 1; 2; 5 |]. - - - - Builds an array from the given list. - - The input list. - - The array of elements from the list. - - - - let inputs = [ 1; 2; 5 ] - - inputs |> Array.ofList - - Evaluates to [| 1; 2; 5 |]. - - - - Returns the lowest of all elements of the array, compared via Operators.min on the function result. - - Throws ArgumentException for empty arrays. - - The function to transform the elements into a type supporting comparison. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The minimum element. - - - - let inputs = [| "aaa"; "b"; "cccc" |] - - inputs |> Array.minBy (fun s -> s.Length) - - Evaluates to "b" - - - - - let inputs: string[]= [| |] - - inputs |> Array.minBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the lowest of all elements of the array, compared via Operators.min. - - Throws ArgumentException for empty arrays - - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The minimum element. - - - - let inputs = [| 10; 12; 11 |] - - inputs |> Array.min - - Evaluates to 10 - - - - - let inputs: int[]= [| |] - - inputs |> Array.min - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the array, compared via Operators.max on the function result. - - Throws ArgumentException for empty arrays. - - The function to transform the elements into a type supporting comparison. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The maximum element. - - - - let inputs = [| "aaa"; "b"; "cccc" |] - - inputs |> Array.maxBy (fun s -> s.Length) - - Evaluates to "cccc" - - - - - let inputs: string[]= [| |] - - inputs |> Array.maxBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the array, compared via Operators.max on the function result. - - Throws ArgumentException for empty arrays. - - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The maximum element. - - - - let inputs = [| 10; 12; 11 |] - - inputs |> Array.max - - Evaluates to 12 - - - - - let inputs: int[]= [| |] - - inputs |> Array.max - - Throws System.ArgumentException. - - - - Builds a new array whose elements are the results of applying the given function - to each of the elements of the array. The integer index passed to the - function indicates the index of element being transformed, starting at zero. - - The function to transform elements and their indices. - The input array. - - The array of transformed elements. - - Thrown when the input array is null. - - - - let inputs = [| 10; 10; 10 |] - - inputs |> Array.mapi (fun i x -> i + x) - - Evaluates to [| 10; 11; 12 |] - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise, also passing the index of - the elements. The two input arrays must have the same lengths, otherwise an ArgumentException is - raised. - - The function to transform pairs of input elements and their indices. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The array of transformed elements. - - - - let inputs1 = [| "a"; "bad"; "good" |] - let inputs2 = [| 0; 2; 1 |] - - (inputs1, inputs2) ||> Array.mapi2 (fun i x y -> i, x[y]) - - Evaluates to [|(0, 'a'); (1, 'd'); (2, 'o')|] - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding triples from the three collections. The three input - arrays must have the same length, otherwise an ArgumentException is - raised. - - The function to transform the pairs of the input elements. - The first input array. - The second input array. - The third input array. - - Thrown when the input arrays differ in length. - Thrown when any of the input arrays is null. - - The array of transformed elements. - - - - let inputs1 = [| "a"; "t"; "ti" |] - let inputs2 = [| "l"; "h"; "m" |] - let inputs3 = [| "l"; "e"; "e" |] - - (inputs1, inputs2, inputs3) |||> Array.map3 (fun x y z -> x + y + z) - - Evaluates to [| "all"; "the"; "time" |] - - - - - Combines map and foldBack. Builds a new array whose elements are the results of applying the given function - to each of the elements of the input array. The function is also used to accumulate a final value. - - The function to transform elements from the input array and accumulate the final value. - The input array. - The initial state. - - Thrown when the input array is null. - - The array of transformed elements, and the final accumulated value. - - Accumulate the charges from back to front, and double them as well - - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - let newCharges, balance = - (inputs, 0) ||> Array.mapFoldBack (fun charge acc -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to [|In 2; Out 4; In 6|] and balance to 2. - - - - Combines map and fold. Builds a new array whose elements are the results of applying the given function - to each of the elements of the input array. The function is also used to accumulate a final value. - - The function to transform elements from the input array and accumulate the final value. - The initial state. - The input array. - - Thrown when the input array is null. - - The array of transformed elements, and the final accumulated value. - - - Accumulate the charges, and double them as well - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - let newCharges, balance = - (0, inputs) ||> Array.mapFold (fun acc charge -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to [|In 2; Out 4; In 6|] and balance to 2. - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise. The two input - arrays must have the same lengths, otherwise an ArgumentException is - raised. - - The function to transform the pairs of the input elements. - The first input array. - The second input array. - - Thrown when the input arrays differ in length. - Thrown when either of the input arrays is null. - - The array of transformed elements. - - - - let inputs1 = [| "a"; "bad"; "good" |] - let inputs2 = [| 0; 2; 1 |] - - (inputs1, inputs2) ||> Array.map2 (fun x y -> x[y]) - - Evaluates to [| 'a'; 'd'; 'o' |] - - - - Builds a new array whose elements are the results of applying the given function - to each of the elements of the array. - - The function to transform elements of the array. - The input array. - - The array of transformed elements. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "bbb"; "cc" |] - - inputs |> Array.map (fun x -> x.Length) - - Evaluates to [| 1; 3; 2 |] - - - - Returns the last element of the array. - Return None if no such element exists. - - The input array. - - The last element of the array or None. - - Thrown when the input sequence is null. - - - - [| "pear"; "banana" |] |> Array.tryLast - - Evaluates to Some "banana" - - - - - [| |] |> Array.tryLast - - Evaluates to None - - - - Returns the length of an array. You can also use property arr.Length. - - The input array. - - The length of the array. - - The notation array.Length is preferred. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.length - - Evaluates to 3 - - - - Gets an element from an array. - - The input index. - The input array. - - The value of the array at the given index. - - Normally the syntax array[index] is preferred. - - Thrown when the input array is null. - Thrown when the index is negative or the input array does not contain enough elements. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.item 1 - - Evaluates to "b" - - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.item 4 - - Throws ArgumentException - - - - Returns the last element of the array. - - The input array. - - The last element of the array. - - Thrown when the input array is null. - Thrown when the input does not have any elements. - - - - [| "pear"; "banana" |] |> Array.last - - Evaluates to banana - - - - - [| |] |> Array.last - - Throws ArgumentException - - - - Applies the given function to pair of elements drawn from matching indices in two arrays, - also passing the index of the elements. The two arrays must have the same lengths, - otherwise an ArgumentException is raised. - - The function to apply to each index and pair of elements. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - - - let inputs1 = [| "a"; "b"; "c" |] - let inputs2 = [| "banana"; "pear"; "apple" |] - - (inputs1, inputs2) ||> Array.iteri2 (fun i s1 s2 -> printfn "Index {i}: {s1} - {s2}") - - Evaluates to unit and prints - - Index 0: a - banana - Index 1: b - pear - Index 2: c - apple - - in the console. - - - - Applies the given function to each element of the array. The integer passed to the - function indicates the index of element. - - The function to apply to each index and element. - The input array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.iteri (fun i v -> printfn "{i}: {v}") - - Evaluates to unit and prints - - 0: a - 1: b - 2: c - - in the console. - - - - Applies the given function to pair of elements drawn from matching indices in two arrays. The - two arrays must have the same lengths, otherwise an ArgumentException is - raised. - - The function to apply. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - - - let inputs1 = [| "a"; "b"; "c" |] - let inputs2 = [| 1; 2; 3 |] - - (inputs1, inputs2) ||> Array.iter2 (printfn "%s: %i") - - Evaluates to unit and prints - - a: 1 - b: 2 - c: 3 - - in the console. - - - - Applies the given function to each element of the array. - - The function to apply. - The input array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.iter (printfn "%s") - - Evaluates to unit and prints - - a - b - c - - in the console. - - - - Returns true if the given array is empty, otherwise false. - - The input array. - - True if the array is empty. - - Thrown when the input array is null. - - - - [| |] |> Array.isEmpty - - Evaluates to true - - - - - [| "pear"; "banana" |] |> Array.isEmpty - - Evaluates to false - - - - Creates an array where the entries are initially the default value Unchecked.defaultof<'T>. - - The length of the array to create. - - The created array. - - Thrown when count is negative. - - - - let arr : int[] = Array.zeroCreate 4 - - Evaluates to [| 0; 0; 0; 0 |] - - - - Creates an array given the dimension and a generator function to compute the elements. - - The number of elements to initialize. - The function to generate the initial values for each index. - - The created array. - - Thrown when count is negative. - - - - Array.init 4 (fun v -> v + 5) - - Evaluates to [| 5; 6; 7; 8 |] - - - - - Array.init -5 (fun v -> v + 5) - - Throws ArgumentException - - - - Builds a new array whose elements are the corresponding elements of the input array - paired with the integer index (from 0) of each element. - - The input array. - - The array of indexed elements. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.indexed - - Evaluates to [| (0, "a"); (1, "b"); (2, "c") |] - - - - Applies a key-generating function to each element of an array and yields an array of - unique keys. Each unique key contains an array of all elements that match - to this key. - - A function that transforms an element of the array into a comparable key. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.groupBy (fun n -> n % 2) - - Evaluates to [| (1, [| 1; 3; 5 |]); (0, [| 2; 4 |]) |] - - - - Returns the first element of the array. - - The input array. - - The first element of the array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - - - let inputs = [| "banana"; "pear" |] - - inputs |> Array.head - - Evaluates to banana - - - - - [| |] |> Array.head - - Throws ArgumentException - - - - Gets an element from an array. - - The input array. - The input index. - - Normally the syntax array[index] is preferred. - - The value of the array at the given index. - - Thrown when the input array is null. - Thrown when the index is negative or the input array does not contain enough elements. - - - - let inputs = [| "a"; "b"; "c" |] - - Array.get inputs 1 - - Evaluates to "b" - - - - - let inputs = [| "a"; "b"; "c" |] - - Array.get inputs 4 - - Throws IndexOutOfRangeException - - - - 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. - - The function to update the state given the input elements. - The first input array. - The second input array. - The initial state. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The final state. - - - Count the positives, negatives and accumulate some text from back to front: - type Count = - { Positive: int - Negative: int - Text: string } - - let inputs1 = [| -1; -2; -3 |] - let inputs2 = [| 3; 2; 1 |] - let initialState = {Positive = 0; Negative = 0; Text = ""} - - (inputs1, inputs2, initialState) |||> Array.foldBack2 (fun a b acc -> - let text = acc.Text + "(" + string a + "," + string b + ") " - if a + b >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text } - ) - - Evaluates to - - { Positive = 2 - Negative = 1 - Text = "(-3,1) (-2,2) (-1,3) " } - - - - - Applies a function to pairs of elements drawn from the two collections, - left-to-right, threading an accumulator argument - through the computation. The two input - arrays must have the same lengths, otherwise an ArgumentException is - raised. - - The function to update the state given the input elements. - The initial state. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The final state. - - - - type CoinToss = Head | Tails - - let data1 = [| Tails; Head; Tails |] - let data2 = [| Tails; Head; Head |] - - (0, data1, data2) |||> Array.fold2 (fun acc a b -> - match (a, b) with - | Head, Head -> acc + 1 - | Tails, Tails -> acc + 1 - | _ -> acc - 1) - - Evaluates to 1 - - - - Applies a function to each element of the array, starting from the end, 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)) - - The function to update the state given the input elements. - The input array. - The initial state. - - The state object after the folding function is applied to each element of the array. - - Thrown when the input array is null. - - - - type Count = - { Positive: int - Negative: int - Text: string } - - let sequence = [| 1; 0; -1; -2; 3 |] - let initialState = {Positive = 0; Negative = 0; Text = "" } - - (sequence, initialState) ||> Array.foldBack (fun a acc -> - let text = acc.Text + " " + string a - if a >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text }) - - Evaluates to - - { Positive = 2 - Negative = 3 - Text = " 3 -2 -1 0 1" } - - - - - Applies a function to each element of the collection, threading an accumulator argument - through the computation. If the input function is f and the elements are i0...iN then computes - f (... (f s i0)...) iN - - The function to update the state given the input elements. - The initial state. - The input array. - - The final state. - - Thrown when the input array is null. - - - - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - (0, inputs) ||> Array.fold (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to 2 - - - - Tests 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. - - The function to test the input elements. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - True if all of the array elements satisfy the predicate. - - - - let inputs1 = [| 1; 2; 3 |] - let inputs2 = [| 1; 2; 3 |] - - (inputs1, inputs2) ||> Array.forall2 (=) - - Evaluates to true. - - - - - let items1 = [| 2017; 1; 1 |] - let items2 = [| 2019; 19; 8 |] - - (items1, items2) ||> Array.forall2 (=) - - Evaluates to false. - - - - - let items1 = [| 1; 2; 3 |] - let items2 = [| 1; 2 |] - - (items1, items2) ||> Array.forall2 (=) - - Throws ArgumentException. - - - - Tests 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. - - The function to test the input elements. - The input array. - - True if all of the array elements satisfy the predicate. - - Thrown when the input array is null. - - - - let isEven a = a % 2 = 0 - - [2; 42] |> Array.forall isEven // evaluates to true - - [1; 2] |> Array.forall isEven // evaluates to false - - - - - Returns the index of the last element in the array - that satisfies the given predicate. Raise if - none of the elements satisfy the predicate. - - The function to test the input elements. - The input array. - - Thrown if predicate - never returns true. - Thrown when the input array is null. - - The index of the last element in the array that satisfies the given predicate. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.findIndex (fun elm -> elm % 2 = 0) - - Evaluates to 3 - - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.findIndex (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the index of the first element in the array - that satisfies the given predicate. Raise if - none of the elements satisfy the predicate. - - The function to test the input elements. - The input array. - - Thrown if predicate - never returns true. - Thrown when the input array is null. - - The index of the first element in the array that satisfies the given predicate. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.findIndex (fun elm -> elm % 2 = 0) - - Evaluates to 1 - - - - - let inputs = [| 1; 2; 3; 4; 5 |] - inputs |> Array.findIndex (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the last element for which the given function returns 'true'. - Raise if no such element exists. - - The function to test the input elements. - The input array. - - Thrown if predicate - never returns true. - Thrown when the input array is null. - - The last element for which predicate returns true. - - - - let inputs = [| 2; 3; 4 |] - - inputs |> Array.findBack (fun elm -> elm % 2 = 0) - - Evaluates to 4 - - - - - let inputs = [| 2; 3; 4 |] - - inputs |> Array.findBack (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the first element for which the given function returns 'true'. - Raise if no such element exists. - - The function to test the input elements. - The input array. - - Thrown when the input array is null. - Thrown if predicate - never returns true. - - The first element for which predicate returns true. - - - - let inputs = [| 1; 2; 3 |] - - inputs |> Array.find (fun elm -> elm % 2 = 0) - - Evaluates to 2 - - - - - let inputs = [| 1; 2; 3 |] - - inputs |> Array.find (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns "true". - - The function to test the input elements. - The input array. - - An array containing the elements for which the given predicate returns true. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.filter (fun elm -> elm % 2 = 0) - - Evaluates to [| 2; 4 |] - - - - Tests 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. - - The function to test the input elements. - The first input array. - The second input array. - - True if any result from predicate is true. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - - - let inputs1 = [| 1; 2 |] - let inputs2 = [| 1; 2; 0 |] - - (inputs1, inputs2) ||> Array.exists2 (fun a b -> a > b) - - Evaluates to false - - - - - let inputs1 = [| 1; 4 |] - let inputs2 = [| 1; 3; 5 |] - - (inputs1, inputs2) ||> Array.exists2 (fun a b -> a > b) - - Evaluates to true - - - - Tests 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. - - The function to test the input elements. - The input array. - - True if any result from predicate is true. - - Thrown when the input array is null. - - - - let input = [| 1; 2; 3; 4; 5 |] - - input |> Array.exists (fun elm -> elm % 4 = 0) - - Evaluates to true - - - - - let input = [| 1; 2; 3; 4; 5 |] - - input |> Array.exists (fun elm -> elm % 6 = 0) - - Evaluates to false - - - - Returns a new list with the distinct elements of the input array which do not appear in the itemsToExclude sequence, - using generic hash and equality comparisons to compare values. - - A sequence whose elements that also occur in the input array will cause those elements to be - removed from the result. - An array whose elements that are not also in itemsToExclude will be returned. - - An array that contains the distinct elements of array that do not appear in itemsToExclude. - - Thrown when either itemsToExclude or array is null. - - - - let original = [| 1; 2; 3; 4; 5 |] - let itemsToExclude = [| 1; 3; 5 |] - - original |> Array.except itemsToExclude - - Evaluates to [| 2; 4 |] - - - - Returns the only element of the array or None if array is empty or contains more than one element. - - The input array. - - The only element of the array or None. - - Thrown when the input array is null. - - - - let inputs = [| "banana" |] - - inputs |> Array.tryExactlyOne - - Evaluates to Some banana - - - - - let inputs = [| "pear"; "banana" |] - - inputs |> Array.tryExactlyOne - - Evaluates to None - - - - - let inputs: int[] = [| |] - - inputs |> Array.tryExactlyOne - - Evaluates to None - - - - Returns the only element of the array. - - The input array. - - The only element of the array. - - Thrown when the input array is null. - Thrown when the input does not have precisely one element. - - - - let inputs = [| "banana" |] - - inputs |> Array.exactlyOne - - Evaluates to banana - - - - - let inputs = [| "pear"; "banana" |] - - inputs |> Array.exactlyOne - - Throws ArgumentException - - - - - let inputs: int[] = [| |] - - inputs |> Array.exactlyOne - - Throws ArgumentException - - - - Returns an empty array of the given type. - The empty array. - - - - Array.empty // Evaluates to [| |] - - - - - Splits the input array into at most count chunks. - - The maximum number of chunks. - The input array. - - The array split into chunks. - - Thrown when the input array is null. - Thrown when count is not positive. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.splitInto 3 - - Evaluates to seq [| [|1; 2|]; [|3; 4|]; [|5|] |] - - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.splitInto -1 - - Throws ArgumentException - - - - Returns an array 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 array then the later occurrences are discarded. - - A function transforming the array items into comparable keys. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| {Bar = 1 };{Bar = 1}; {Bar = 2}; {Bar = 3} |] - - inputs |> Array.distinctBy (fun foo -> foo.Bar) - - Evaluates to [| { Bar = 1 }; { Bar = 2 }; { Bar = 3 } |] - - - - Returns an array that contains no duplicate entries according to generic hash and - equality comparisons on the entries. - If an element occurs multiple times in the array then the later occurrences are discarded. - - The input array. - - The result array. - - Thrown when the input array is null. - - - - let input = [| 1; 1; 2; 3 |] - - input |> Array.distinct - - Evaluates to [| 1; 2; 3 |] - - - - Divides the input array into chunks of size at most chunkSize. - - The maximum size of each chunk. - The input array. - - The array divided into chunks. - - Thrown when the input array is null. - Thrown when chunkSize is not positive. - - - - let input = [| 1; 2; 3 |] - - input |> Array.chunkBySize 2 - - Evaluates to [| [|1; 2|]; [|3|] |] - - - - - let input = [| 1; 2; 3 |] - - input |> Array.chunkBySize -2 - - Throws ArgumentException - - - - Applies the given function to each element of the array. Returns - the array comprised of the results x for each element where - the function returns Some(x) - - The function to generate options from the elements. - The input array. - - The array of results. - - Thrown when the input array is null. - - - - let input = [| Some 1; None; Some 2 |] - - input |> Array.choose id - - Evaluates to [| 1; 2 |] - - - - - let input = [| 1; 2; 3 |] - - input |> Array.choose (fun n -> if n % 2 = 0 then Some n else None) - - Evaluates to [| 2 |] - - - - Applies the given function to successive elements, returning the first - result where the function returns Some(x) for some x. If the function - never returns Some(x) then is raised. - - The function to generate options from the elements. - The input array. - - Thrown when the input array is null. - Thrown if every result from - chooser is None. - - The first result. - - - - let input = [| 1; 2; 3 |] - - input |> Array.pick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to "2". - - - - - let input = [| 1; 2; 3 |] - - input |> Array.pick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Throws KeyNotFoundException. - - - - - Fills a range of elements of the array with the given value. - - The target array. - The index of the first element to set. - The number of elements to set. - The value to set. - - Thrown when the input array is null. - Thrown when either targetIndex or count is negative. - - - - let target = [| 0; 1; 2; 3; 4; 5 |] - - Array.fill target 3 2 100 - - After evaluation target contains [| 0; 1; 2; 100; 100; 5 |]. - - - - Applies the given function to successive elements, returning the first - result where the function returns Some(x) for some x. If the function - never returns Some(x) then None is returned. - - The function to transform the array elements into options. - The input array. - - The first transformed element that is Some(x). - - Thrown when the input array is null. - - - - let input = [| 1; 2; 3 |] - - input |> Array.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to Some "2". - - - - - let input = [| 1; 2; 3 |] - - input |> Array.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Evaluates to None. - - - - - Returns the first element of the array, or - None if the array is empty. - - The input array. - - Thrown when the input array is null. - - The first element of the array or None. - - - - let inputs = [| "banana"; "pear" |] - - inputs |> Array.tryHead - - Evaluates to Some "banana" - - - - - let inputs : int[] = [| |] - - inputs |> Array.tryHead - - Evaluates to None - - - - Creates an array whose elements are all initially the given value. - - The length of the array to create. - The value for the elements. - - The created array. - - Thrown when count is negative. - - - - Array.create 4 "a" - - Evaluates to a new array containing[| "a"; "a"; "a"; "a" |]. - - - - - let cell = ref "a" - let array = Array.create 2 cell - cell.Value <- "b" - - - Before evaluation of the last line, array contains[| { contents = "a"}; { contents = "a"} |]. - After evaluation of the last line array contains[| { contents = "b"}; { contents = "b"} |]. - Note each entry in the array is the same mutable cell object. - - - - Applies a key-generating function to each element of an array and returns an array yielding unique - keys and their number of occurrences in the original array. - - A function transforming each item of the input array into a key to be - compared against the others. - The input array. - - The result array. - - Thrown when the input array is null. - - - - type Foo = { Bar: string } - - let inputs = [| {Bar = "a"}; {Bar = "b"}; {Bar = "a"} |] - - inputs |> Array.countBy (fun foo -> foo.Bar) - - Evaluates to [| ("a", 2); ("b", 1) |] - - - - Builds a new array that contains the elements of the given array. - - The input array. - - A copy of the input array. - - Thrown when the input array is null. - - - - let source = [| 12; 13; 14 |] - - Array.copy source - - Evaluates to a new array containing[| 12; 13; 14 |]. - - - - Tests if the array contains the specified element. - - The value to locate in the input array. - The input array. - - True if the input array contains the specified element; false otherwise. - - Thrown when the input array is null. - - - - [| 1; 2 |] |> Array.contains 2 // evaluates to true - [| 1; 2 |] |> Array.contains 5 // evaluates to false - - - - - Builds a new array that contains the elements of each of the given sequence of arrays. - - The input sequence of arrays. - - The concatenation of the sequence of input arrays. - - Thrown when the input sequence is null. - - - - let inputs = [ [| 1; 2 |]; [| 3 |]; [| 4; 5 |] ] - - inputs |> Array.concat - - Evaluates to [| 1; 2; 3; 4; 5 |] - - - - Compares two arrays using the given comparison function, element by element. - - A function that takes an element from each array and returns an int. - If it evaluates to a non-zero value iteration is stopped and that value is returned. - The first input array. - The second input array. - - Returns the first non-zero result from the comparison function. If the first array has - a larger element, the return value is always positive. If the second array has a larger - element, the return value is always negative. When the elements are equal in the two - arrays, 1 is returned if the first array is longer, 0 is returned if they are equal in - length, and -1 is returned when the second array is longer. - - Thrown when either of the input arrays - is null. - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1; 10 |] - let input2 = [| 1; 10 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to 0 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1; 5 |] - let input2 = [| 1; 8 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to -1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1; 11 |] - let input2 = [| 1; 13 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1; 2 |] - let input2 = [| 1 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1 |] - let input2 = [| 1; 2 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to -1 - - - - For each element of the array, applies the given function. Concatenates all the results and return the combined array. - - The function to create sub-arrays from the input array elements. - The input array. - - The concatenation of the sub-arrays. - - Thrown when the input array is null. - - - - type Foo = { Bar: int[] } - - let input = [| {Bar = [| 1; 2 |]}; {Bar = [| 3; 4 |]} |] - - input |> Array.collect (fun foo -> foo.Bar) - - Evaluates to [| 1; 2; 3; 4 |] - - - - - let input = [[1; 2]; [3; 4]] - - input |> Array.collect id - - Evaluates to [| 1; 2; 3; 4 |] - - - - Reads a range of elements from the first array and write them into the second. - - The source array. - The starting index of the source array. - The target array. - The starting index of the target array. - The number of elements to copy. - - - Slicing syntax is generally preferred, e.g. - - let source = [| 12; 13; 14 |] - let target = [| 0; 1; 2; 3; 4; 5 |] - target[3..4] <- source[1..2] - - - - Thrown when either of the input arrays is null. - Thrown when any of sourceIndex, targetIndex or count are negative, - or when there aren't enough elements in source or target. - - - - let source = [| 12; 13; 14 |] - let target = [| 0; 1; 2; 3; 4; 5 |] - - Array.blit source 1 target 3 2 - - After evaluation target contains [| 0; 1; 2; 13; 14; 5 |]. - - - - Returns the average of the elements generated by applying the function to each element of the array. - - The function to transform the array elements before averaging. - The input array. - - Thrown when array is empty. - - The computed average. - - Thrown when the input array is null. - - - - type Foo = { Bar: float } - - let input = [| {Bar = 2.0}; {Bar = 4.0} |] - - input |> Array.averageBy (fun foo -> foo.Bar) - - Evaluates to 3.0 - - - - - type Foo = { Bar: float } - - let input : Foo[] = [| |] - - input |> Array.averageBy (fun foo -> foo.Bar) - - Throws ArgumentException - - - - Returns the average of the elements in the array. - - The input array. - - Thrown when array is empty. - Thrown when the input array is null. - - The average of the elements in the array. - - - - [| 1.0; 2.0; 6.0 |] |> Array.average - - Evaluates to 3.0 - - - - - [| |] |> Array.average - - Throws ArgumentException - - - - Builds a new array that contains the elements of the first array followed by the elements of the second array. - - The first input array. - The second input array. - - The resulting array. - - Thrown when either of the input arrays is null. - - - - Array.append [| 1; 2 |] [| 3; 4 |] - - Evaluates to [| 1; 2; 3; 4 |]. - - - - Returns a new array that contains all pairings of elements from the first and second arrays. - - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - - The resulting array of pairs. - - - - ([| 1; 2 |], [| 3; 4 |]) ||> Array.allPairs - - Evaluates to - - [| (1, 3); (1, 4); (2, 3); (2, 4) |] - - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns true. - - The function to test the input elements. - The input array. - - An array containing the elements for which the given predicate returns true. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.Parallel.filter (fun elm -> elm % 2 = 0) - - Evaluates to [| 2; 4 |] - - - - Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - raised. - - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The array of tupled elements. - - - - let numbers = [|1; 2|] - let names = [|"one"; "two"|] - - Array.Parallel.zip numbers names - - Evaluates to [| (1, "one"); (2, "two") |]. - - - - Sorts the elements of an array in parallel, in descending order, using the given projection for the keys and returning a new array. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - The sorted array. - - - - let input = [| "a"; "bbb"; "cccc"; "dd" |] - - input |> Array.Parallel.sortByDescending (fun s -> s.Length) - - Evaluates to [|"cccc"; "bbb"; "dd"; "a"|]. - - - - Sorts the elements of an array in parallel, in descending order, returning a new array. Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The input array. - - The sorted array. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - input |> Array.Parallel.sortDescending - - Evaluates to [| 8; 6; 4; 3; 1; 1 |]. - - - - Sorts the elements of an array by mutating the array in-place in parallel, using the given comparison function. - Elements are compared using . - - The input array. - - Thrown when the input array is null. - - - - let array = [| 8; 4; 3; 1; 6; 1 |] - - Array.sortInPlace array - - After evaluation array contains [| 1; 1; 3; 4; 6; 8 |]. - - - - Sorts the elements of an array by mutating the array in-place in parallel, using the given comparison function as the order. - - The function to compare pairs of array elements. - The input array. - - Thrown when the input array is null. - - The following sorts entries using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let array = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |] - - array |> Array.Parallel.sortInPlaceWith compareEntries - - After evaluation array contains [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. - - - - Sorts the elements of an array by mutating the array in-place in parallel, using the given projection for the keys. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - Thrown when the input array is null. - - - - let array = [| "a"; "bbb"; "cccc"; "dd" |] - - array |> Array.Parallel.sortInPlaceBy (fun s -> s.Length) - - After evaluation array contains [|"a"; "dd"; "bbb"; "cccc"|]. - - - - Sorts the elements of an array in parallel, using the given comparison function as the order, returning a new array. - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to compare pairs of array elements. - The input array. - - The sorted array. - - Thrown when the input array is null. - - Sort an array of pairs using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let input = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |] - - input |> Array.Parallel.sortWith compareEntries - - Evaluates to [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. - - - - Sorts the elements of an array in parallel, using the given projection for the keys and returning a new array. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - The sorted array. - - Thrown when the input array is null. - - - - let input = [| "a"; "bbb"; "cccc"; "dd" |] - - input |> Array.Parallel.sortBy (fun s -> s.Length) - - Evaluates to [|"a"; "dd"; "bbb"; "cccc"|]. - - - - Sorts the elements of an array in parallel, returning a new array. Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The input array. - - The sorted array. - - Thrown when the input array is null. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - Array.Parallel.sort input - - Evaluates to [| 1; 1 3; 4; 6; 8 |]. - - - - 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 . - The order in which the given function is applied to indices is not specified. - - The function to test the input elements. - The input array. - - The two arrays of results. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.Parallel.partition (fun x -> x % 2 = 0) - - Evaluates to ([|2; 4|], [|1; 3|]). - - - - Create an array given the dimension and a generator function to compute the elements. - - Performs the operation in parallel using . - The order in which the given function is applied to indices is not specified. - - - - - The array of results. - - - - Array.Parallel.init 4 (fun v -> v + 5) - - Evaluates to [| 5; 6; 7; 8 |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.Parallel.iteri (fun i v -> printfn "{i}: {v}") - - Evaluates to unit and prints the following to the console in an unspecified order: - - 0: a - 2: c - 1: b - - - - - Apply the given function to each element of the array. - - Performs the operation in parallel using . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.Parallel.iter (printfn "%s") - - Evaluates to unit and prints the following to the console in an unspecified order: - - a - c - b - - - - - Applies a key-generating function to each element of an array in parallel and yields an array of - unique keys. Each unique key contains an array of all elements that match - to this key. - - Performs the operation in parallel using . - The order in which the given function is applied to elements of the input array is not specified. - The order of the keys and values in the result is also not specified - A function that transforms an element of the array into a comparable key. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.Parallel.groupBy (fun n -> n % 2) - - Evaluates to [| (1, [| 1; 3; 5 |]); (0, [| 2; 4 |]) |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - The array of results. - - Thrown when the input array is null. - - - - let inputs = [| 10; 10; 10 |] - - inputs |> Array.Parallel.mapi (fun i x -> i + x) - - Evaluates to [| 10; 11; 12 |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - The array of results. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "bbb"; "cc" |] - - inputs |> Array.Parallel.map (fun x -> x.Length) - - Evaluates to [| 1; 3; 2 |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - 'U[] - - Thrown when the input array is null. - - - - type Foo = { Bar: int[] } - - let input = [| {Bar = [| 1; 2 |]}; {Bar = [| 3; 4 |]} |] - - input |> Array.Parallel.collect (fun foo -> foo.Bar) - - Evaluates to [| 1; 2; 3; 4 |] - - - - - let input = [| [| 1; 2 |]; [| 3; 4 |] |] - - input |> Array.Parallel.collect id - - Evaluates to [| 1; 2; 3; 4 |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - The function to generate options from the elements. - The input array. - - The array of results. - - Thrown when the input array is null. - - - - let input = [| Some 1; None; Some 2 |] - - input |> Array.Parallel.choose id - - Evaluates to [| 1; 2 |] - - - - - let input = [| 1; 2; 3 |] - - input |> Array.Parallel.choose (fun n -> if n % 2 = 0 then Some n else None) - - Evaluates to [| 2 |] - - - - Returns the average of the elements generated by applying the function to each element of the array. - - The function to transform the array elements before averaging. - The input array. - - Thrown when array is empty. - - The computed average. - - Thrown when the input array is null. - - - - type Foo = { Bar: float } - - let input = [| {Bar = 2.0}; {Bar = 4.0} |] - - input |> Array.Parallel.averageBy (fun foo -> foo.Bar) - - Evaluates to 3.0 - - - - - type Foo = { Bar: float } - - let input : Foo[] = [| |] - - input |> Array.Parallel.averageBy (fun foo -> foo.Bar) - - Throws ArgumentException - - - - Returns the average of the elements in the array. - - The input array. - - Thrown when array is empty. - Thrown when the input array is null. - - The average of the elements in the array. - - - - [| 1.0; 2.0; 6.0 |] |> Array.Parallel.average - - Evaluates to 3.0 - - - - - [| |] |> Array.Parallel.average - - Throws ArgumentException - - - - Returns the sum of the results generated by applying the function to each element of the array. - - The function to transform the array elements into the type to be summed. - The input array. - - The resulting sum. - - Thrown when the input array is null. - - - - let input = [| "aa"; "bbb"; "cc" |] - - input |> Array.Parallel.sumBy (fun s -> s.Length) - - Evaluates to 7. - - - - Returns the sum of the elements in the array. - - The input array. - - The resulting sum. - - Thrown when the input array is null. - - - - let input = [| 1; 5; 3; 2 |] - - input |> Array.Parallel.sum - - Evaluates to 11. - - - - Returns the lowest of all elements of the array, compared via Operators.min on the function result. - - Throws ArgumentException for empty arrays. - - The function to transform the elements into a type supporting comparison. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The minimum element. - - - - let inputs = [| "aaa"; "b"; "cccc" |] - - inputs |> Array.Parallel.minBy (fun s -> s.Length) - - Evaluates to "b" - - - - - let inputs: string[]= [| |] - - inputs |> Array.Parallel.minBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the smallest of all elements of the array, compared via Operators.min. - - Throws ArgumentException for empty arrays - - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The minimum element. - - - - let inputs = [| 10; 12; 11 |] - - inputs |> Array.Parallel.min - - Evaluates to 10 - - - - - let inputs: int[]= [| |] - - inputs |> Array.Parallel.min - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the array, compared via Operators.max on the function result. - - Throws ArgumentException for empty arrays. - - The function to transform the elements into a type supporting comparison. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The maximum element. - - - - let inputs = [| "aaa"; "b"; "cccc" |] - - inputs |> Array.Parallel.maxBy (fun s -> s.Length) - - Evaluates to "cccc" - - - - - let inputs: string[]= [| |] - - inputs |> Array.Parallel.maxBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the array, compared via Operators.max. - - Throws ArgumentException for empty arrays. - - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The maximum element. - - - - let inputs = [| 10; 12; 11 |] - - inputs |> Array.Parallel.max - - Evaluates to 12 - - - - - let inputs: int[]= [| |] - - inputs |> Array.Parallel.max - - Throws System.ArgumentException. - - - - Applies a projection function to each element of the array in parallel, reducing elements in each thread with a dedicated 'reduction' function. - After processing entire input, results from all threads are reduced together. - Raises ArgumentException if the array is empty. - The order of processing is not guaranteed. For that reason, the 'reduction' function argument should be commutative. - (That is, changing the order of execution must not affect the result) - - The function to project from elements of the input array - The function to reduce a pair of projected elements to a single element. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The final result of the reductions. - - - - let inputs = [| "1"; "3"; "4"; "2" |] - - inputs |> Array.Parallel.reduceBy (fun x -> int x) (+) - - Evaluates to 1 + 3 + 4 + 2. However, the system could have decided to compute (1+3) and (4+2) first, and then put them together. - - - - Applies a function to each element of the array in parallel, threading an accumulator argument - through the computation for each thread involved in the computation. After processing entire input, results from all threads are reduced together. - Raises ArgumentException if the array is empty. - The order of processing is not guaranteed. For that reason, the 'reduce' function argument should be commutative. - (That is, changing the order of execution must not affect the result) - Also, compared to the non-parallel version of Array.reduce, the 'reduce' function may be invoked more times due to the resulting reduction from participating threads. - - The function to reduce a pair of elements to a single element. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - Result of the reductions. - - - - let inputs = [| 1; 3; 4; 2 |] - - inputs |> Array.Parallel.reduce (fun a b -> a + b) - - Evaluates to 1 + 3 + 4 + 2. However, the system could have decided to compute (1+3) and (4+2) first, and then put them together. - - - - Applies the given function to successive elements, returning the first - result where the function returns Some(x) for some x. If the function - never returns Some(x) then None is returned. - - The function to transform the array elements into options. - The input array. - - The first transformed element that is Some(x). - - Thrown when the input array is null. - - - - let input = [| 1; 2; 3 |] - - input |> Array.Parallel.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to Some 2. - - - - - let input = [| 1; 2; 3 |] - - input |> Array.Parallel.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Evaluates to None. - - - - - Returns the index of the first element in the array - that satisfies the given predicate. - Returns None if no such element exists. - The function to test the input elements. - The input array. - - Thrown when the input array is null. - - The index of the first element that satisfies the predicate, or None. - - Try to find the index of the first even number: - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.Parallel.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to Some 1 - - - Try to find the index of the first even number: - - let inputs = [| 1; 3; 5; 7 |] - - inputs |> Array.Parallel.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the first element for which the given function returns True. - Returns None if no such element exists. - - The function to test the input elements. - The input array. - - The first element that satisfies the predicate, or None. - - Thrown when the input array is null. - - Try to find the first even number: - - let inputs = [| 1; 2; 3 |] - - inputs |> Array.Parallel.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to Some 2. - - - Try to find the first even number: - - let inputs = [| 1; 5; 3 |] - - inputs |> Array.Parallel.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Tests if any element of the array satisfies the given predicate. - - The predicate is applied to the elements of the input array in parallel. If any application - returns true then the overall result is true and testing of other elements in all threads is stopped at system's earliest convenience. - Otherwise, false is returned. - - The function to test the input elements. - The input array. - - True if any result from predicate is true. - - Thrown when the input array is null. - - - - let input = [| 1; 2; 3; 4; 5 |] - - input |> Array.Parallel.exists (fun elm -> elm % 4 = 0) - - Evaluates to true - - - - - let input = [| 1; 2; 3; 4; 5 |] - - input |> Array.Parallel.exists (fun elm -> elm % 6 = 0) - - Evaluates to false - - - - Tests if all elements of the array satisfy the given predicate. - - The predicate is applied to the elements of the input collection in parallel. If any application - returns false then the overall result is false and testing of other elements in all threads is stopped at system's earliest convenience. - Otherwise, true is returned. - - The function to test the input elements. - The input array. - - True if all of the array elements satisfy the predicate. - - Thrown when the input array is null. - - - - let isEven a = a % 2 = 0 - - [2; 42] |> Array.Parallel.forall isEven // evaluates to true - - [1; 2] |> Array.Parallel.forall isEven // evaluates to false - - - - - Provides parallel operations on arrays - - - Contains operations for working with arrays. - - - See also F# Language Guide - Arrays. - - - - Sets the value of an element in an array. You can also - use the syntax 'array.[index1,index2,index3,index4] <- value'. - - The input array. - The index along the first dimension. - The index along the second dimension. - The index along the third dimension. - The index along the fourth dimension. - The value to set. - - - Indexer syntax is generally preferred, e.g. - - let array: float[,,,] = Array4D.zeroCreate 2 3 4 5 - - array[0,2,1,3] <- 5.0 - - - - - - let array = Array4D.zeroCreate 2 3 4 5 - - Array4D.2et array 0 2 1 3 5.0 - - - - - Fetches an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' - - The input array. - The index along the first dimension. - The index along the second dimension. - The index along the third dimension. - The index along the fourth dimension. - - The value at the given index. - - - Indexer syntax is generally preferred, e.g. - - let array: float[,,,] = Array4D.zeroCreate 2 3 4 5 - - array[0,2,1,3] - - - - - - let array = Array4D.zeroCreate 2 3 4 5 - - Array4D.get array 0 2 1 3 - - - - - Creates an array where the entries are initially the "default" value. - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The length of the fourth dimension. - - The created array. - - - - let array : float[,,,] = Array4D.zeroCreate 2 3 3 5 - - After evaluation array is a 2x3x3x5 array with contents all zero. - - - - Returns the length of an array in the fourth dimension. - - The input array. - - The length of the array in the fourth dimension. - - - - let array = Array4D.init 2 3 4 5 (fun i j k -> 100*i + 10*j + k) - - array |> Array4D.length4 - - Evaluates to 5. - - - - Returns the length of an array in the third dimension. - - The input array. - - The length of the array in the third dimension. - - - - let array = Array4D.init 2 3 4 5 (fun i j k -> 100*i + 10*j + k) - - array |> Array4D.length3 - - Evaluates to 4. - - - - Returns the length of an array in the second dimension. - - The input array. - - The length of the array in the second dimension. - - - - let array = Array4D.init 2 3 4 5 (fun i j k -> 100*i + 10*j + k) - - array |> Array4D.length2 - - Evaluates to 3. - - - - Returns the length of an array in the first dimension - - The input array. - - The length of the array in the first dimension. - - - - let array = Array4D.init 2 3 4 5 (fun i j k -> 100*i + 10*j + k) - - array |> Array4D.length1 - - Evaluates to 2. - - - - Creates an array given the dimensions and a generator function to compute the elements. - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The length of the fourth dimension. - The function to create an initial value at each index in the array. - - The created array. - - - - Array4D.init 2 2 2 2 (fun i j k l -> i*1000+j*100+k*10+l) - - Evaluates to a 2x2x2x2 array with contents [[[[0; 1]; [10; 11]]; [[100; 101]; [110; 111]]];[[[1000; 1]; [1010; 1011]]; [[1100; 1101]; [1110; 1111]]]] - - - - - Creates an array whose elements are all initially the given value - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The length of the fourth dimension. - The initial value for each element of the array. - - The created array. - - - - Array4D.create 2 2 2 2 1 - - Evaluates to a 2x2x2x2 array with all entries 1 - - - - - Contains operations for working with rank 4 arrays. - - - Creates an array where the entries are initially the "default" value. - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - - The created array. - - - - let array : float[,,] = Array3D.zeroCreate 2 3 3 - - After evaluation array is a 2x3x3 array with contents all zero. - - - - Sets the value of an element in an array. You can also - use the syntax 'array.[index1,index2,index3] <- value'. - - The input array. - The index along the first dimension. - The index along the second dimension. - The index along the third dimension. - The value to set at the given index. - - - Indexer syntax is generally preferred, e.g. - - let array = Array3D.zeroCreate 2 3 3 - - array[0,2,1] < 4.0 - - Evaluates to 11. - - - - - let array = Array3D.zeroCreate 2 3 3 - - Array3D.set array 0 2 1 4.0 - - After evaluation array is a 2x3x3 array with contents [[[0.0; 0.0; 0.0]; [0.0; 4.0; 0.0]]; [[0.0; 0.0; 0.0]; [0.0; 0.0; 0.0]]] - - - - Builds 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 propagated to the output - array. - The function to transform the elements at each index in the array. - The input array. - - The array created from the transformed elements. - - - - let inputs = Array3D.zeroCreate 2 3 3 - - inputs |> Array3D.mapi (fun i j k v -> 100*i + 10*j + k) - - Evaluates to a 2x3x3 array with contents [[[0; 2; 4]; [20; 22; 24]]; [[200; 202; 204]; [220; 222; 224]]] - - - - Builds 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 propagated to the output - array. - The function to transform each element of the array. - The input array. - - The array created from the transformed elements. - - - - let inputs = Array3D.init 2 3 3 (fun i j k -> 100*i + 10*j + k) - - inputs |> Array3D.map (fun v -> 2 * v) - - Evaluates to a 2x3x3 array with contents [[[0; 2; 4]; [20; 22; 24]]; [[200; 202; 204]; [220; 222; 224]]] - - - - Returns the length of an array in the third dimension. - - The input array. - - The length of the array in the third dimension. - - - - let array = Array3D.init 2 3 4 (fun i j k -> 100*i + 10*j + k) - - array |> Array3D.length3 - - Evaluates to 4. - - - - Returns the length of an array in the second dimension. - - The input array. - - The length of the array in the second dimension. - - - - let array = Array3D.init 2 3 4 (fun i j k -> 100*i + 10*j + k) - - array |> Array3D.length2 - - Evaluates to 3. - - - - Returns the length of an array in the first dimension - - The input array. - - The length of the array in the first dimension. - - - - let array = Array3D.init 2 3 4 (fun i j k -> 100*i + 10*j + k) - - array |> Array3D.length1 - - Evaluates to 2. - - - - Applies the given function to each element of the array. The integer indices passed to the - function indicates the index of element. - - The function to apply to each element of the array. - The input array. - - - - let inputs = Array3D.init 2 2 3 (fun i j k -> 100*i + 10*j + k) - - inputs |> Array3D.iteri (fun i j k v -> printfn $"value at ({i},{j},{k}) = {v}") - - Evaluates to unit and prints - - value at (0,0,0) = 0 - value at (0,0,1) = 1 - value at (0,0,2) = 2 - value at (0,1,0) = 10 - value at (0,1,1) = 11 - value at (0,1,2) = 12 - value at (1,0,0) = 100 - value at (1,0,1) = 101 - value at (1,0,2) = 102 - value at (1,1,0) = 110 - value at (1,1,1) = 111 - value at (1,1,2) = 112 - - in the console. - - - - Applies the given function to each element of the array. - - The function to apply to each element of the array. - The input array. - - - - let inputs = Array3D.init 2 2 3 (fun i j k -> 100*i + 10*j + k) - - inputs |> Array3D.iter (fun v -> printfn $"value = {v}") - - Evaluates to unit and prints - - value = 0 - value = 1 - value = 2 - value = 10 - value = 11 - value = 12 - value = 100 - value = 101 - value = 102 - value = 110 - value = 111 - value = 112 - - in the console. - - - - Fetches an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' - - The input array. - The index along the first dimension. - The index along the second dimension. - The index along the third dimension. - - The value at the given index. - - - Indexer syntax is generally preferred, e.g. - - let array = Array3D.init 2 3 3 (fun i j k -> 100*i + 10*j + k) - - array[0,2,1] - - Evaluates to 11. - - - - - let array = Array3D.init 2 3 3 (fun i j k -> 100*i + 10*j + k) - - Array3D.get array 0 2 1 - - Evaluates to 21. - - - - Creates an array given the dimensions and a generator function to compute the elements. - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The function to create an initial value at each index into the array. - - The created array. - - - - Array3D.init 2 2 3 (fun i j k -> 100*i + 10*j + k) - - Evaluates to a 2x2x3 array with contents [[[0; 1; 2]; [10; 11; 12]]; [[100; 101; 102]; [110; 111; 112]]] - - - - Creates an array whose elements are all initially the given value. - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The value of the array elements. - - The created array. - - - - Array3D.create 2 2 3 1 - - Evaluates to a 2x3 array with contents [[[1; 1; 1]; [1; 1; 1]]; [[1; 1; 1]; [1; 1; 1]]] - - - - - Contains operations for working with rank 3 arrays. - - - See also F# Language Guide - Arrays. - - - - Returns binding for the largest key in the map. - Raise KeyNotFoundException when map is empty. - - The input map. - Thrown if the map is empty. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.maxKeyValue // evaluates to (2, "b") - - - - - Returns binding for the smallest key in the map. - Raise KeyNotFoundException when map is empty. - - The input map. - Thrown if the map is empty. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.minKeyValue // evaluates to (1, "a") - - - - - The values in the map, including the duplicates. - The sequence will be ordered by the keys of the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.values // evaluates to seq ["a"; "b"] - - - - - The keys in the map. - The sequence will be ordered by the keys of the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.keys // evaluates to seq [1; 2] - - - - - The number of bindings in the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.count // evaluates to 2 - - - - - Returns the key of the first mapping in the collection that satisfies the given predicate. - Returns 'None' if no such element exists. - - The function to test the input elements. - The input map. - - The first key for which the predicate returns true or None if the predicate evaluates to false for each key/value pair. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.tryFindKey (fun n s -> n = s.Length) // evaluates to Some 1 - sample |> Map.tryFindKey (fun n s -> n < s.Length) // evaluates to None - - - - - 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. - - The function to test the input elements. - The input map. - Thrown if the key does not exist in the map. - - The first key for which the predicate evaluates true. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.findKey (fun n s -> n = s.Length) // evaluates to 1 - sample |> Map.findKey (fun n s -> n < s.Length) // throws KeyNotFoundException - - - - - 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 input key. - The input map. - - The found Some value or None. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.tryFind 1 // evaluates to Some "a" - sample |> Map.tryFind 3 // evaluates to None - - - - - Removes an element from the domain of the map. No exception is raised if the element is not present. - - The input key. - The input map. - - The resulting map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.remove 1 // evaluates to map [(2, "b")] - sample |> Map.remove 3 // equal to sample - - - - - Builds two new maps, one containing the bindings for which the given predicate returns 'true', - and the other the remaining bindings. - - The function to test the input elements. - The input map. - - A pair of maps in which the first contains the elements for which the predicate returned true - and the second containing the elements for which the predicated returned false. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.partition (fun n s -> n = s.Length) // evaluates to (map [(1, "a")], map [(2, "b")]) - - - - - Tests if an element is in the domain of the map. - - The input key. - The input map. - - True if the map contains the key. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.containsKey 1 // evaluates to true - sample |> Map.containsKey 3 // evaluates to false - - - - - Builds a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The key passed to the - function indicates the key of element being transformed. - - The function to transform the key/value pairs. - The input map. - - The resulting map of keys and transformed values. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.map (fun n s -> sprintf "%i %s" n s) // evaluates to map [(1, "1 a"); (2, "2 b")] - - - - - Returns true if the given predicate returns true for all of the - bindings in the map. - - The function to test the input elements. - The input map. - - True if the predicate evaluates to true for all of the bindings in the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.forall (fun n s -> n >= s.Length) // evaluates to true - sample |> Map.forall (fun n s -> n = s.Length) // evaluates to false - - - - - Builds a new map containing only the bindings for which the given predicate returns 'true'. - - The function to test the key/value pairs. - The input map. - - The filtered map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.filter (fun n s -> n = s.Length) // evaluates to map [(1, "a")] - - - - - Returns true if the given predicate returns true for one of the - bindings in the map. - - The function to test the input elements. - The input map. - - True if the predicate returns true for one of the key/value pairs. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.exists (fun n s -> n = s.Length) // evaluates to true - sample |> Map.exists (fun n s -> n < s.Length) // evaluates to false - - - - - Applies the given function to each binding in the dictionary - - The function to apply to each key/value pair. - The input map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.iter (fun n s -> printf "%i %s " n s) - - Prints "1 a 2 b ". - - - - Folds over the bindings in the map - - The function to update the state given the input key/value pairs. - The initial state. - The input map. - - The final state value. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - ("initial", sample) ||> Map.fold (fun state n s -> sprintf "%s %i %s" state n s) - - Evaluates to "initial 1 a 2 b". - - - - Folds over the bindings in the map. - - The function to update the state given the input key/value pairs. - The input map. - The initial state. - - The final state value. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - (sample, "initial") ||> Map.foldBack (fun n s state -> sprintf "%i %s %s" n s state) - - Evaluates to "1 a 2 b initial" - - - - Searches the map looking for the first element where the given function returns a Some value. - Raise KeyNotFoundException if no such element exists. - - The function to generate options from the key/value pairs. - The input map. - Thrown if no element returns a Some - value when evaluated by the chooser function - - The first result. - - - - let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ] - - sample |> Map.pick (fun n s -> if n > 5 && s.Length > 2 then Some s else None) - - Evaluates to "ccc" - - - - let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ] - - sample |> Map.pick (fun n s -> if n > 5 && s.Length > 4 then Some s else None) - - Raises KeyNotFoundException - - - - Searches the map looking for the first element where the given function returns a Some value. - - The function to generate options from the key/value pairs. - The input map. - - The first result. - - - - let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ] - - sample |> Map.tryPick (fun n s -> if n > 5 && s.Length > 2 then Some s else None) - - Evaluates to Some "ccc". - - - - - let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ] - - sample |> Map.tryPick (fun n s -> if n > 5 && s.Length > 4 then Some s else None) - - Evaluates to None. - - - - Lookup an element in the map, raising KeyNotFoundException if no binding - exists in the map. - - The input key. - The input map. - Thrown when the key does not exist in the map. - - The value mapped to the given key. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.find 1 // evaluates to "a" - sample |> Map.find 3 // throws KeyNotFoundException - - - - - The empty map. - - - - let emptyMap = Map.empty<int, string> - - - - - Is the map empty? - - The input map. - - True if the map is empty. - - - - let emptyMap = Map.empty<int, string> - emptyMap |> Map.isEmpty // evaluates to true - - let notEmptyMap = Map [ (1, "a"); (2, "b") ] - emptyMap |> Map.isEmpty // evaluates to false - - - - - Returns an array of all key-value pairs in the mapping. - The array will be ordered by the keys of the map. - - The input map. - - The array of key/value pairs. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.toArray // evaluates to [|(1, "a"); (2, "b")|] - - - - - Returns a list of all key-value pairs in the mapping. - The list will be ordered by the keys of the map. - - The input map. - - The list of key/value pairs. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.toList // evaluates to [(1, "a"); (2, "b")] - - - - - Views the collection as an enumerable sequence of pairs. - The sequence will be ordered by the keys of the map. - - The input map. - - The sequence of key/value pairs. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.toSeq // evaluates to seq [(1, "a"); (2, "b")] - - - - - Returns a new map made from the given bindings. - - The input sequence of key/value pairs. - - The resulting map. - - - - let input = seq { (1, "a"); (2, "b") } - - input |> Map.ofSeq // evaluates to map [(1, "a"); (2, "b")] - - - - - Returns a new map made from the given bindings. - - The input array of key/value pairs. - - The resulting map. - - - - let input = [| (1, "a"); (2, "b") |] - - input |> Map.ofArray // evaluates to map [(1, "a"); (2, "b")] - - - - - Returns a new map made from the given bindings. - - The input list of key/value pairs. - - The resulting map. - - - - let input = [ (1, "a"); (2, "b") ] - - input |> Map.ofList // evaluates to map [(1, "a"); (2, "b")] - - - - - Returns a new map with the value stored under key changed according to f. - - The input key. - The change function. - The input map. - - The resulting map. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.change 1 (fun x -> - match x with - | Some s -> Some (s + "z") - | None -> None - ) // evaluates to map [(1, "az"); (2, "b")] - - - - - Returns a new map with the binding added to the given map. - If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. - - The input key. - The input value. - The input map. - - The resulting map. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.add 3 "c" // evaluates to map [(1, "a"); (2, "b"); (3, "c")] - input |> Map.add 2 "aa" // evaluates to map [(1, "a"); (2, "aa")] - - - - - Contains operations for working with values of type . - - - Returns a new set with the elements of the second set removed from the first. - - The first input set. - The set whose elements will be removed from set1. - - The set with the elements of set2 removed from set1. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"The difference of {set1} and {set2} is {Set.difference set1 set2}" - - The sample evaluates to the following output: The difference of set [1; 2; 3] and set [2; 3; 4] is set [1] - - - - Builds a new collection from the given enumerable object. - - The input sequence. - - The set containing elements. - - - - let set = Set.ofSeq [1, 2, 3] - printfn $"The set is {set} and type is {set.GetType().Name}" - - The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1" - - - - Returns an ordered view of the collection as an enumerable object. - - The input set. - - An ordered sequence of the elements of set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - let seq = Set.toSeq set - printfn $"The set is {set} and type is {seq.GetType().Name}" - - The sample evaluates to the following output: he set is set [1; 2; 3] and type is Microsoft.FSharp.Collections.FSharpSet`1[System.Int32] - - - - Builds an array that contains the elements of the set in order. - - The input set. - - An ordered array of the elements of set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - let array = Set.toArray set - printfn$ "The set is {set} and type is {array.GetType().Name}" - - The sample evaluates to the following output: The set is [|1; 2; 3|] and type is System.Int32[] - - - - Builds a set that contains the same elements as the given array. - - The input array. - - A set containing the elements of array. - - - - let set = Set.ofArray [|1, 2, 3|] - printfn $"The set is {set} and type is {set.GetType().Name}" - - The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1" - - - - Builds a list that contains the elements of the set in order. - - The input set. - - An ordered list of the elements of set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - let list = Set.toList set - printfn $"The set is {list} and type is {list.GetType().Name}" - - The sample evaluates to the following output: The set is [1; 2; 3] and type is "FSharpList`1" - - - - Builds a set that contains the same elements as the given list. - - The input list. - - A set containing the elements form the input list. - - - - let set = Set.ofList [1, 2, 3] - printfn $"The set is {set} and type is {set.GetType().Name}" - - The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1" - - - - Returns the highest element in the set according to the ordering being used for the set. - - The input set. - - The max value from the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The min element of {set} is {Set.minElement set}" - - The sample evaluates to the following output: The max element of set [1; 2; 3] is 3 - - - - Returns the lowest element in the set according to the ordering being used for the set. - - The input set. - - The min value from the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The min element of {set} is {Set.minElement set}" - - The sample evaluates to the following output: The min element of set [1; 2; 3] is 1 - - - - Returns a new set with the given element removed. No exception is raised if - the set doesn't contain the given element. - - The element to remove. - The input set. - - The input set with value removed. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The set without 1 is {Set.remove 1 set}" - - The sample evaluates to the following output: The set without 1 is set [2; 3] - - - - Splits the set into two sets containing the elements for which the given predicate - returns true and false respectively. - - The function to test set elements. - The input set. - - A pair of sets with the first containing the elements for which predicate returns - true and the second containing the elements for which predicate returns false. - - - - let set = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"The set with even numbers is {Set.partition (fun x -> x % 2 = 0) set}" - - The sample evaluates to the following output: The partitioned sets are: (set [2; 4], set [1; 3]) - - - - Applies the given function to each element of the set, in order according - to the comparison function. - - The function to apply to each element. - The input set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - Set.iter (fun x -> printfn $"The set contains {x}") set - - The sample evaluates to the following output: - The set contains 1 - The set contains 2 - The set contains 3 - - - - Returns "true" if the set is empty. - - The input set. - - True if set is empty. - - - - let set = Set.empty.Add(2).Add(3) - printfn $"Is the set empty? {set.IsEmpty}" - - The sample evaluates to the following output: Is the set empty? false - - - - Computes the union of a sequence of sets. - - The sequence of sets to union. - - The union of the input sets. - - - - let headersByFile = seq{ - yield [ "id"; "name"; "date"; "color" ] - yield [ "id"; "age"; "date" ] - yield [ "id"; "sex"; "date"; "animal" ] - } - headersByFile - |> Seq.map Set.ofList - |> Set.intersectMany - |> printfn "The intersection of %A is %A" headersByFile - - The sample evaluates to the following output: The union of seq - [["id"; "name"; "date"; "color"]; ["id"; "age"; "date"]; - ["id"; "sex"; "date"; "animal"]] is set ["age"; "animal"; "color"; "date"; "id"; "name"; "sex"] - - - - Computes the union of the two sets. - - The first input set. - The second input set. - - The union of set1 and set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"The union of {set1} and {set2} is {(Set.union set1 set2)}" - - The sample evaluates to the following output: The union of set [1; 2; 3] and set [2; 3; 4] is set [1; 2; 3; 4] - - - - Computes the intersection of a sequence of sets. The sequence must be non-empty. - - The sequence of sets to intersect. - - The intersection of the input sets. - - - - let headersByFile = seq{ - yield [ "id"; "name"; "date"; "color" ] - yield [ "id"; "age"; "date" ] - yield [ "id"; "sex"; "date"; "animal" ] - } - headersByFile - |> Seq.map Set.ofList - |> Set.intersectMany - |> printfn "The intersection of %A is %A" headersByFile - - The sample evaluates to the following output: The intersection of seq - [["id"; "name"; "date"; "color"]; ["id"; "age"; "date"]; - ["id"; "sex"; "date"; "animal"]] is set ["date"; "id"] - - - - Computes the intersection of the two sets. - - The first input set. - The second input set. - - The intersection of set1 and set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"The intersection of {set1} and {set2} is {Set.intersect set1 set2}" - - The sample evaluates to the following output: The intersection of set [1; 2; 3] and set [2; 3; 4] is set [2; 3] - - - - Tests 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. - - The function to test set elements. - The input set. - - True if all elements of set satisfy predicate. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"Does the set contain even numbers? {Set.forall (fun x -> x % 2 = 0) set}" - - The sample evaluates to the following output: Does the set contain even numbers? false - - - - Applies the given accumulating function to all the elements of the set. - - The accumulating function. - The input set. - The initial state. - - The final state. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The sum of the set is {Set.foldBack (+) set 0}" - printfn $"The set is {Set.foldBack (fun x acc -> x :: acc) set []}" - - The sample evaluates to the following output: The sum of the set is 6 - The set is [1; 2; 3] - - - - Applies the given accumulating function to all the elements of the set - - The accumulating function. - The initial state. - The input set. - - The final state. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The sum of the set is {Set.fold (+) 0 set}" - printfn $"The product of the set is {Set.fold (*) 1 set}" - printfn $"The reverse of the set is {Set.fold (fun x y -> y :: x) [] set}" - - The sample evaluates to the following output: The sum of the set is 6 - The product of the set is 6 - The reverse of the set is [3; 2; 1] - - - - Returns a new collection containing the results of applying the - given function to each element of the input set. - - The function to transform elements of the input set. - The input set. - - A set containing the transformed elements. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The set with doubled values is {Set.map (fun x -> x * 2) set}" - - The sample evaluates to the following output: The set with doubled values is set [2; 4; 6] - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns True. - - The function to test set elements. - The input set. - - The set containing only the elements for which predicate returns true. - - - - let set = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"The set with even numbers is {Set.filter (fun x -> x % 2 = 0) set}" - - The sample evaluates to the following output: The set with even numbers is set [2; 4] - - - - Tests if any element of the collection satisfies the given predicate. - If the input function is predicate and the elements are i0...iN - then computes p i0 or ... or p iN. - - The function to test set elements. - The input set. - - True if any element of set satisfies predicate. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"Does the set contain 1? {Set.exists (fun x -> x = 1) set}" - - The sample evaluates to the following output: Does the set contain 1? true - - - - Returns the number of elements in the set. Same as size. - - The input set. - - The number of elements in the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The set has {set.Count} elements" - - The sample evaluates to the following output: The set has 3 elements - - - - Evaluates to "true" if all elements of the second set are in the first, and at least - one element of the first is not in the second. - - The potential superset. - The set to test against. - - True if set1 is a proper superset of set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a proper superset of {set2}? {Set.isProperSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a proper superset of set [1; 2; 3; 4]? false - - - - Evaluates to "true" if all elements of the second set are in the first. - - The potential superset. - The set to test against. - - True if set1 is a superset of set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a superset of {set2}? {Set.isSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a superset of set [1; 2; 3; 4]? false - - - - Evaluates to "true" if all elements of the first set are in the second, and at least - one element of the second is not in the first. - - The potential subset. - The set to test against. - - True if set1 is a proper subset of set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a proper subset of {set2}? {Set.isProperSubset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a proper subset of set [1; 2; 3; 4]? true - - - - Evaluates to "true" if all elements of the first set are in the second - - The potential subset. - The set to test against. - - True if set1 is a subset of set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a subset of {set2}? {Set.isSubset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a subset of set [1; 2; 3; 4]? true - - - - Evaluates to "true" if the given element is in the given set. - - The element to test. - The input set. - - True if element is in set. - - - - let set = Set.empty.Add(2).Add(3) - printfn $"Does the set contain 1? {set.Contains(1))}" - - The sample evaluates to the following output: Does the set contain 1? false - - - - Returns a new set with an element added to the set. No exception is raised if - the set already contains the given element. - - The value to add. - The input set. - - A new set containing value. - - - - let set = Set.empty.Add(1).Add(1).Add(2) - printfn $"The new set is: {set}" - - The sample evaluates to the following output: The new set is: set [1; 2] - - - - The set containing the given element. - - The value for the set to contain. - - The set containing value. - - - - Set.singleton 7 - - Evaluates to set [ 7 ]. - - - - The empty set for the type 'T. - - - - Set.empty<int> - - Evaluates to set [ ]. - - - - Contains operations for working with values of type . - - - Returns a representing an F# tuple type with the given element types - - Runtime assembly containing System.Tuple definitions. - An array of types for the tuple elements. - - The type representing the tuple containing the input elements. - - - - - Returns a representing an F# tuple type with the given element types - - An array of types for the tuple elements. - - The type representing the tuple containing the input elements. - - - - - Returns a representing an F# struct tuple type with the given element types - - An array of types for the tuple elements. - - The type representing the struct tuple containing the input elements. - - - - - Returns a representing an F# struct tuple type with the given element types - - Runtime assembly containing System.ValueTuple definitions. - An array of types for the tuple elements. - - The type representing the struct tuple containing the input elements. - - - - - Returns a representing the F# function type with the given domain and range - - The input type of the function. - The output type of the function. - - The function type with the given domain and range. - - - - - Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type - - The type to check. - Optional binding flags. - - True if the type check succeeds. - - - - - Return true if the typ is a representation of an F# tuple type - - The type to check. - - True if the type check succeeds. - - - - - Return true if the typ is a representation of an F# record type - - The type to check. - Optional binding flags. - - True if the type check succeeds. - - - - - Return true if the typ is a value corresponding to the compiled form of an F# module - - The type to check. - - True if the type check succeeds. - - - - - 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 - - The type to check. - - True if the type check succeeds. - - - - - Returns true if the typ is a representation of an F# exception declaration - - The type to check. - Optional binding flags. - - True if the type check is an F# exception. - - - - - Gets the cases of a union type. - - Assumes the given type is a union type. If not, is raised during pre-computation. - - The input union type. - Optional binding flags. - - Thrown when the input type is not a union type. - - An array of descriptions of the cases of the given union type. - - - - - Gets the tuple elements from the representation of an F# tuple type. - - The input tuple type. - - An array of the types contained in the given tuple type. - - - - - Reads all the fields from a record value, in declaration order - - Assumes the given input is a record value. If not, is raised. - - The input record type. - Optional binding flags. - - An array of descriptions of the properties of the record type. - - - - - Gets the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type - - The input function type. - - A tuple of the domain and range types of the input function. - - - - - Reads all the fields from an F# exception declaration, in declaration order - - Assumes exceptionType is an exception representation type. If not, is raised. - - The exception type to read. - Optional binding flags. - - Thrown if the given type is not an exception. - - An array containing the PropertyInfo of each field in the exception. - - - - - 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, 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. - - The type of union to optimize reading. - Optional binding flags. - - An optimized function to read the tags of the given union type. - - - - - Precompute a property or static method for reading an integer representing the case tag of a union type. - - The type of union to read. - Optional binding flags. - - The description of the union case reader. - - - - - 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 - - The description of the union case to read. - Optional binding flags. - - A function to for reading the fields of the given union case. - - - - - A method that constructs objects of the given case - - The description of the union case. - Optional binding flags. - - The description of the constructor of the given union case. - - - - - Precompute a function for constructing a discriminated union value for a particular union case. - - The description of the union case. - Optional binding flags. - - A function for constructing values of the given union case. - - - - - Precompute a function for reading the values of a particular tuple type - - Assumes the given type is a TupleType. - If not, is raised during pre-computation. - - The tuple type to read. - - Thrown when the given type is not a tuple type. - - A function to read values of the given tuple type. - - - - - Gets information that indicates how to read a field of a tuple - - The input tuple type. - The index of the tuple element to describe. - - The description of the tuple element and an optional type and index if the tuple is big. - - - - - Gets a method that constructs objects of the given tuple type. - For small tuples, no additional type 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. - - The input tuple type. - - The description of the tuple type constructor and an optional extra type - for large tuples. - - - - - Precompute a function for reading the values of a particular tuple type - - Assumes the given type is a TupleType. - If not, is raised during pre-computation. - - The type of tuple to read. - - Thrown when the given type is not a tuple type. - - A function to read a particular tuple type. - - - - - 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, 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. - - The type of record to read. - Optional binding flags. - - Thrown when the input type is not a record type. - - An optimized reader for the given record 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, 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. - - The PropertyInfo of the field to read. - - Thrown when the input type is not a record type. - - A function to read the specified field from the record. - - - - - Get a ConstructorInfo for a record type - - The record type. - Optional binding flags. - - A ConstructorInfo for the given record type. - - - - - Precompute a function for constructing a record value. - - Assumes the given type is a RecordType. - If not, is raised during pre-computation. - - The type of record to construct. - Optional binding flags. - - Thrown when the input type is not a record type. - - A function to construct records of the given type. - - - - - Create a union case value. - - The description of the union case to create. - The array of arguments to construct the given case. - Optional binding flags. - - The constructed union case. - - - - - Creates an instance of a tuple type - - Assumes at least one element is given. If not, is raised. - - The array of tuple fields. - The tuple type to create. - - Thrown if no elements are given. - - An instance of the tuple type with the given elements. - - - - - Creates an instance of a record type. - - Assumes the given input is a record type. - - The type of record to make. - The array of values to initialize the record. - Optional binding flags for the record. - - Thrown when the input type is not a record type. - - The created record. - - - - - Builds a typed function from object from a dynamic function implementation - - The function type of the implementation. - The untyped lambda of the function implementation. - - A typed function from the given dynamic implementation. - - - - - Identify the union case and its fields for an object - - Assumes the given input is a union case value. If not, 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'. - The input union case. - The union type containing the value. - Optional binding flags. - - Thrown when the input type is not a union case value. - - The description of the union case and its fields. - - - - - Reads all fields from a tuple. - - Assumes the given input is a tuple value. If not, is raised. - - The input tuple. - - Thrown when the input is not a tuple value. - - An array of the fields from the given tuple. - - - - - Reads a field from a tuple value. - - Assumes the given input is a tuple value. If not, is raised. - - The input tuple. - The index of the field to read. - - The value of the field. - - - - - Reads all the fields from a record value. - - Assumes the given input is a record value. If not, is raised. - The record object. - Optional binding flags for the record. - - Thrown when the input type is not a record type. - - The array of fields from the record. - - - - - Reads a field from a record value. - - Assumes the given input is a record value. If not, is raised. - - The record object. - The PropertyInfo describing the field to read. - - Thrown when the input is not a record value. - - The field from the record. - - - - - Reads 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, is raised. - - The exception instance. - Optional binding flags. - - Thrown when the input type is not an F# exception. - - The fields from the given exception. - - - - - Contains operations associated with constructing and analyzing values associated with F# types - such as records, unions and tuples. - - - The integer tag for the case. - - - - type CoinToss = Heads | Tails - - typeof<CoinToss> - |> FSharpType.GetUnionCases - |> Array.map (fun x -> $"{x.Name} has tag {x.Tag}") - - Evaluates to [|"Heads has tag 0"; "Tails has tag 1"|] - - - - The name of the case. - - - - type Weather = Rainy | Sunny - - typeof<Weather> - |> FSharpType.GetUnionCases - |> Array.map (fun x -> x.Name) - - Evaluates to [|"Rainy", "Sunny"|] - - - - The type in which the case occurs. - - - - type Weather = Rainy | Sunny - - let rainy = - typeof<Weather> - |> FSharpType.GetUnionCases - |> Array.head - - rainy.DeclaringType - - Evaluates to a value of type System.Type - that holds type information for Weather. - - - - The fields associated with the case, represented by a PropertyInfo. - The fields associated with the case. - - - - type Shape = - | Rectangle of width : float * length : float - | Circle of radius : float - | Prism of width : float * float * height : float - - typeof<Shape> - |> FSharpType.GetUnionCases - |> Array.map (fun unionCase -> - unionCase.GetFields() - |> Array.map (fun fieldInfo -> - fieldInfo.Name, - fieldInfo.PropertyType.Name)) - - Evaluates to - - [|[|("width", "Double"); ("length", "Double")|]; - [|("radius", "Double")|]; - [|("width", "Double"); ("Item2", "Double"); ("height", "Double")|]|] - - - - - Returns the custom attributes data associated with the case. - An list of custom attribute data items. - - - - type Signal(signal: string) = - inherit System.Attribute() - member this.Signal = signal - - type Answer = - | [<Signal("Thumbs up")>] Yes - | [<Signal("Thumbs down")>] No - - let answerYes = - typeof<Answer> - |> FSharpType.GetUnionCases - |> Array.find (fun x -> x.Name = "Yes") - - answerYes.GetCustomAttributesData() - - Evaluates to - - [|[FSI_0150+Signal("Thumbs up")] - {AttributeType = FSI_0150+Signal; - Constructor = Void .ctor(System.String); - ConstructorArguments = seq ["Thumbs up"]; - NamedArguments = seq [];}; - [Microsoft.FSharp.Core.CompilationMappingAttribute((Microsoft.FSharp.Core.SourceConstructFlags)8, (Int32)0)] - {AttributeType = Microsoft.FSharp.Core.CompilationMappingAttribute; - Constructor = Void .ctor(Microsoft.FSharp.Core.SourceConstructFlags, Int32); - ConstructorArguments = seq - [(Microsoft.FSharp.Core.SourceConstructFlags)8; - (Int32)0]; - NamedArguments = seq [];}|] - - - - - Returns the custom attributes associated with the case matching the given attribute type. - The type of attributes to return. - - An array of custom attributes. - - - - type Signal(signal: string) = - inherit System.Attribute() - member this.Signal = signal - - type Answer = - | [<Signal("Thumbs up")>] Yes - | [<Signal("Thumbs down")>] No - - typeof<Answer> - |> FSharpType.GetUnionCases - |> Array.map (fun x -> x.GetCustomAttributes(typeof<Signal>)) - - Evaluates to - - [|[|FSI_0147+Signal {Signal = "Thumbs up"; - TypeId = FSI_0147+Signal;}|]; - [|FSI_0147+Signal {Signal = "Thumbs down"; - TypeId = FSI_0147+Signal;}|]|] - - - - - Returns the custom attributes associated with the case. - An array of custom attributes. - - - - type Weather = - | Rainy - | Sunny - - typeof<Weather> - |> FSharpType.GetUnionCases - |> Array.map (fun x -> x.GetCustomAttributes()) - - Evaluates to - - [|[|Microsoft.FSharp.Core.CompilationMappingAttribute - {ResourceName = null; - SequenceNumber = 0; - SourceConstructFlags = UnionCase; - TypeDefinitions = null; - TypeId = Microsoft.FSharp.Core.CompilationMappingAttribute; - VariantNumber = 0;}|]; - [|Microsoft.FSharp.Core.CompilationMappingAttribute - {ResourceName = null; - SequenceNumber = 1; - SourceConstructFlags = UnionCase; - TypeDefinitions = null; - TypeId = Microsoft.FSharp.Core.CompilationMappingAttribute; - VariantNumber = 0;}|]|] - - - - - Represents a case of a discriminated union type - - - Library functionality for accessing additional information about F# types and F# values at - runtime, augmenting that available through System.Reflection. - - - - Returns true if the exceptionType is a representation of an F# exception declaration - - The type to check. - Optional flag that denotes accessibility of the private representation. - - True if the type check is an F# exception. - - - - - Reads all the fields from an F# exception declaration, in declaration order - - Assumes exceptionType is an exception representation type. If not, is raised. - - The exception type to read. - Optional flag that denotes accessibility of the private representation. - - Thrown if the given type is not an exception. - - An array containing the PropertyInfo of each field in the exception. - - - - - Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type - - The type to check. - Optional flag that denotes accessibility of the private representation. - - True if the type check succeeds. - - - - - Return true if the typ is a representation of an F# record type - - The type to check. - Optional flag that denotes accessibility of the private representation. - - True if the type check succeeds. - - - - - Gets the cases of a union type. - - Assumes the given type is a union type. If not, is raised during pre-computation. - - The input union type. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a union type. - - An array of descriptions of the cases of the given union type. - - - - - Reads all the fields from a record value, in declaration order - - Assumes the given input is a record value. If not, is raised. - - The input record type. - Optional flag that denotes accessibility of the private representation. - - An array of descriptions of the properties of the record type. - - - - - Reads 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, is raised. - - The exception instance. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not an F# exception. - - The fields from the given exception. - - - - - A method that constructs objects of the given case - - The description of the union case. - Optional flag that denotes accessibility of the private representation. - - The description of the constructor of the given union case. - - - - - Precompute a function for constructing a discriminated union value for a particular union case. - - The description of the union case. - Optional flag that denotes accessibility of the private representation. - - A function for constructing values of the given union case. - - - - - 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 - - The description of the union case to read. - Optional flag that denotes accessibility of the private representation. - - A function to for reading the fields of the given union case. - - - - - Precompute a property or static method for reading an integer representing the case tag of a union type. - - The type of union to read. - Optional flag that denotes accessibility of the private representation. - - The description of the union case reader. - - - - - Assumes the given type is a union type. - If not, 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. - - The type of union to optimize reading. - Optional flag that denotes accessibility of the private representation. - - An optimized function to read the tags of the given union type. - - - - - Identify the union case and its fields for an object - - Assumes the given input is a union case value. If not, 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'. - - The input union case. - The union type containing the value. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a union case value. - - The description of the union case and its fields. - - - - - Create a union case value. - - The description of the union case to create. - The array of arguments to construct the given case. - Optional flag that denotes accessibility of the private representation. - - The constructed union case. - - - - - Get a ConstructorInfo for a record type - - The record type. - Optional flag that denotes accessibility of the private representation. - - A ConstructorInfo for the given record type. - - - - - Precompute a function for constructing a record value. - - Assumes the given type is a RecordType. - If not, is raised during pre-computation. - - The type of record to construct. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a record type. - - A function to construct records of the given type. - - - - - 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, 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. - - The type of record to read. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a record type. - - An optimized reader for the given record type. - - - - - Reads all the fields from a record value. - - Assumes the given input is a record value. If not, is raised. - - The record object. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a record type. - - The array of fields from the record. - - - - - Creates an instance of a record type. - - Assumes the given input is a record type. - - The type of record to make. - The array of values to initialize the record. - Optional flags that denotes accessibility of the private representation. - - Thrown when the input type is not a record type. - - The created record. - - - - - Defines further accessing additional information about F# types and F# values at runtime. - - - - 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 evaluation of IEnumerable objects - to a small, finite depth, as determined by the printing parameters. - This may lead to additional computation being performed during printing. - - - - - Data representing structured layouts of terms. - - - - - 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 Layout module. any_to_string and output_any are - built using any_to_layout with default format options. - - - - - For limiting 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. - - - - - See tagL - - - - - Layout like an F# list. - - - - - Layout like an F# option. - - - - - Layout list vertically. - - - - - Layout two vertically. - - - - - Form tuple of layouts. - - - - - Wrap braces around layout. - - - - - Wrap square brackets around layout. - - - - - Wrap round brackets around Layout. - - - - - Join layouts into a list separated using the given Layout. - - - - - Join layouts into a semi-colon separated list. - - - - - Join layouts into a space separated list. - - - - - Join layouts into a comma separated list. - - - - - Join broken with ident=4 - - - - - Join broken with ident=3 - - - - - Join broken with ident=2 - - - - - Join broken with ident=1 - - - - - Join broken with ident=0 - - - - - optional break, indent=4 - - - - - optional break, indent=3 - - - - - Join, possible break with indent=2 - - - - - Join, possible break with indent=1 - - - - - Join, possible break with indent=0 - - - - - Join, unbreakable. - - - - - An string which is left parenthesis (no space on the right). - - - - - An string which is right parenthesis (no space on the left). - - - - - An string which requires no spaces either side. - - - - - An string leaf - - - - - 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. - - - - - Is it the empty layout? - - - - - The empty layout - - - - - 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. - - - - Gets the raw expression associated with this type-carrying expression - - - - open FSharp.Quotations - - let expr1 = <@ 1 + 1 @> - - expr1.Raw - - Evaluates to the same quotation as <@ expr1 @> except with the weaker type Expr instead of Expr<int>. - - - - Type-carrying quoted expressions. Expressions are generated either - by quotations in source text or programatically - - - Returns type of an expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let sampleQuotation = <@ 1 + 1 @> - - sampleQuotation.Type - - Evaluates to typeof<int>. - - - - Returns the custom attributes of an expression. For quotations deriving from quotation literals this may include the source location of the literal. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let sampleQuotation = <@ 1 + 1 @> - - sampleQuotation.CustomAttributes - - Evaluates to a list of expressions containing one custom attribute for the source location of the quotation literal. - - - - Builds an expression that represents a value and its associated reflected definition as a quotation - - The untyped object. - The type of the object. - The definition of the value being quoted. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.WithValue(box 1, typeof<int>, <@ 2 - 1 @>) - - Evaluates to a quotation that displays as WithValue (1, Call (None, op_Subtraction, [Value (2), Value (1)])). - - - - Builds an expression that represents a value and its associated reflected definition as a quotation - - The value being quoted. - The definition of the value being quoted. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.WithValue(1, <@ 2 - 1 @>) - - Evaluates to a quotation that displays as WithValue (1, Call (None, op_Subtraction, [Value (2), Value (1)])). - - - - Builds an expression that represents a while loop - - The predicate to control the loop iteration. - The body of the while loop. - - The resulting expression. - - - - open FSharp.Quotations - - let guardExpr = <@ true @> - let bodyExpr = <@ () @> - - Expr.WhileLoop(guardExpr, bodyExpr) - - Evaluates to a quotation with the same structure as <@ while true do () @>. - - - - Builds an expression that represents setting a mutable variable - - The input variable. - The value to set. - - The resulting expression. - - - - open FSharp.Quotations - - let vVar = Var("v", typeof<int>, isMutable=true) - - Expr.VarSet(vVar, <@ 5 @>) - - Evaluates to a quotation displayed as VarSet (v, Value (5)). - - - - Builds an expression that represents a variable - - The input variable. - - The resulting expression. - - - - open FSharp.Quotations - - let vVar = Var("v", typeof<int>) - - Expr.Var(vVar) - - Evaluates to a quotation displayed as v. - - - - Builds an expression that represents a constant value of a particular type, arising from a variable of the given name - - The untyped object. - The type of the object. - The name of the variable. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.ValueWithName(box 1, typeof<int>, "name") - - Evaluates to a quotation with the same structure as <@ 1 @> and associated information that the name of the value is "name". - - - - Builds an expression that represents a constant value, arising from a variable of the given name - - The typed value. - The name of the variable. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.ValueWithName(1, "name") - - Evaluates to a quotation with the same structure as <@ 1 @> and associated information that the name of the value is "name". - - - - Builds an expression that represents a constant value - - The typed value. - - - - open FSharp.Quotations - - Expr.Value(1) - - Evaluates to a quotation with the same structure as <@ 1 @>. - - - - Builds an expression that represents a constant value of a particular type - - The untyped object. - The type of the object. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.Value(box 1, typeof<int>) - - Evaluates to a quotation with the same structure as <@ 1 @>. - - - - Builds an expression that represents a test of a value is of a particular union case - - The expression to test. - The description of the union case. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Reflection - - let ucCons = FSharpType.GetUnionCases(typeof<int list>)[1] - - Expr.UnionCaseTest(<@ [11] @>, ucCons) - - Evaluates to a quotation that displays as UnionCaseTest (NewUnionCase (Cons, Value (11), NewUnionCase (Empty)), Cons). - - - - Builds an expression that represents a type test. - - The expression to test. - The target type. - - The resulting expression. - - - - open FSharp.Quotations - - let obj = box 1 - - Expr.TypeTest( <@ obj @>, typeof<int>) - - Evaluates to quotation that displays as TypeTest (Int32, PropertyGet (None, obj, [])). - - - - Builds an expression that represents getting a field of a tuple - - The input tuple. - The index of the tuple element to get. - - The resulting expression. - - - - open FSharp.Quotations - - let tupExpr = <@ (1, 2, 3) @> - - Expr.TupleGet(tupExpr, 1) - - Evaluates to quotation that displays as TupleGet (NewTuple (Value (1), Value (2), Value (3)), 1). - - - - Builds an expression that represents a try/with construct for exception filtering and catching. - - The body of the try expression. - - - The variable to bind to a caught exception. - The expression evaluated when an exception is caught. - - The resulting expression. - - - - open System - open FSharp.Quotations - - let exnVar = Var("exn", typeof<exn>) - - Expr.TryWith(<@ 1+1 @>, exnVar, <@ 1 @>, exnVar, <@ 2+2 @>) - - Evaluates to a quotation with the same structure as <@ try 1+1 with exn -> 2+2 @>. - - - - 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. - - The description of the method to find. - - The reflection definition or None if a match could not be found. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - [<ReflectedDefinition>] - let f x = x + 1 - - let methInfo = - match <@ f 1 @> with - | Call(_, mi, _) -> mi - | _ -> failwith "call expected" - - Expr.TryGetReflectedDefinition(methInfo) - - Evaluates to a quotation with the same structure as <@ fun x -> x + 1 @>, which is the implementation of the - method f. - - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - [<ReflectedDefinition>] - module Methods = - let f x = (x, x) - - let methInfoGeneric = - match <@ Methods.f (1, 2) @> with - | Call(_, mi, _) -> mi.GetGenericMethodDefinition() - | _ -> failwith "call expected" - - let methInfoAtString = methInfoGeneric.MakeGenericMethod(typeof<string>) - - Expr.TryGetReflectedDefinition(methInfoAtString) - - Evaluates to a quotation with the same structure as <@ fun (x: string) -> (x, x) @>, which is the implementation of the - generic method f instanatiated at type string. - - - - Builds an expression that represents a try/finally construct - - The body of the try expression. - The final part of the expression to be evaluated. - - The resulting expression. - - - - open System - open FSharp.Quotations - - Expr.TryFinally(<@ 1+1 @>, <@ Console.WriteLine("finally") @>) - - Evaluates to a quotation with the same structure as <@ try 1+1 finally Console.WriteLine("finally") @>. - - - - Format the expression as a string - - Indicates if method, property, constructor and type objects should be printed in detail. If false, these are abbreviated to their name. - - The formatted string. - - - - open FSharp.Quotations - - let expr1 = <@ 1 + 1 @> - - expr1.ToString(true) - - Evaluates "Call (None, Int32 op_Addition[Int32,Int32,Int32](Int32, Int32),[Value (1), Value (1)])". - - - - Substitutes 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. - - The function to map variables into expressions. - - The expression with the given substitutions. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let sampleQuotation = <@ fun v -> v * v @> - - let v, body = - match sampleQuotation with - | Lambda(v, body) -> (v, body) - | _ -> failwith "unreachable" - - body.Substitute(function v2 when v = v2 -> Some <@ 1 + 1 @> | _ -> None) - - Evaluates to <@ (1 + 1) * (1 + 1)>. - - - - Builds an expression that represents the sequential execution of one expression followed by another - - The first expression. - The second expression. - - The resulting expression. - - - - open System - open FSharp.Quotations - - Expr.Sequential(<@ Console.WriteLine("a") @>, <@ Console.WriteLine("b") @>) - - Evaluates to a quotation with the same structure as <@ Console.WriteLine("a"); Console.WriteLine("b") @>. - - - - Permits interactive environments such as F# Interactive - to explicitly register new pickled resources that represent persisted - top level definitions. - - The assembly associated with the resource. - The unique name for the resources being added. - The type definitions referenced. - The serialized resource to register with the environment. - - - - Permits interactive environments such as F# Interactive - to explicitly register new pickled resources that represent persisted - top level definitions. - - The assembly associated with the resource. - The unique name for the resources being added. - The serialized resource to register with the environment. - - - - Builds an expression that represents a nested typed quotation literal - - The expression being quoted. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.QuoteTyped(<@ 1 @>) - - Evaluates to a quotation with the same structure as <@ <@ 1 @> @>. - - - - Builds an expression that represents a nested raw quotation literal - - The expression being quoted. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.QuoteRaw(<@ 1 @>) - - Evaluates to a quotation with the same structure as <@ <@ 1 @> @>. - - - - Builds an expression that represents a nested typed or raw quotation literal - - The expression being quoted. - - The resulting expression. - - - Builds an expression that represents writing to a static property - - The description of the property. - The value to set. - List of indices for the property if it is an indexed property. - - The resulting expression. - - - - open System - open System.Collections.Generic - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let propInfo = - match <@ Console.BackgroundColor <- ConsoleColor.Red @> with - | PropertySet(None, pi, _, _) -> pi - | _ -> failwith "property get expected" - - Expr.PropertySet(propInfo, <@ ConsoleColor.Blue @>) - - Evaluates to a quotation with the same structure as <@ Console.BackgroundColor <- ConsoleColor.Blue @>. - - - - Builds an expression that represents writing to a property of an object - - The input object. - The description of the property. - The value to set. - List of indices for the property if it is an indexed property. - - The resulting expression. - - - - open System - open System.Collections.Generic - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let propInfo = - match <@ (new List<int>()).Capacity @> with - | PropertyGet(Some _, pi, _) -> pi - | _ -> failwith "property get expected" - - let objExpr = <@ (new List<int>()) @> - - Expr.PropertySet(objExpr, propInfo, <@ 6 @>) - - Evaluates to a quotation with the same structure as <@ (new List<int>()).Capacity <- 6 @>. - - - - Builds an expression that represents reading a static property - - The description of the property. - List of indices for the property if it is an indexed property. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let propInfo = - match <@ Console.Out @> with - | PropertyGet(None, pi, _) -> pi - | _ -> failwith "property get expected" - - Expr.PropertyGet(propInfo) - - Evaluates to a quotation with the same structure as <@ Console.Out @>. - - - - Builds an expression that represents reading a property of an object - - The input object. - The description of the property. - List of indices for the property if it is an indexed property. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let propInfo = - match <@ "a".Length @> with - | PropertyGet(Some _, pi, _) -> pi - | _ -> failwith "property get expected" - - let objExpr = <@ "bb" @> - - Expr.PropertyGet(objExpr, propInfo) - - Evaluates to a quotation with the same structure as <@ "bb".Length @>. - - - - Builds an expression that represents the creation of a union case value - - The description of the union case. - The list of arguments for the case. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Reflection - - let ucCons = FSharpType.GetUnionCases(typeof<int list>)[1] - - Expr.NewUnionCase(ucCons, [ <@ 10 @>; <@ [11] @> ]) - - Evaluates to a quotation with the same structure as <@ 10 :: [11] @>. - - - - Builds an expression that represents the creation of an F# tuple value - - The list of elements of the tuple. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.NewTuple([ <@ 1 @>; <@ "a" @> ]) - - Evaluates to a quotation with the same structure as <@ (1, "a") @>. - - - - Builds an expression that represents the creation of an F# tuple value - - The list of elements of the tuple. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.NewStructTuple( [ <@ 1 @>; <@ "a" @> ]) - - Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. - - - - Builds an expression that represents the creation of an F# tuple value - - Runtime assembly containing System.ValueTuple definitions. - The list of elements of the tuple. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.NewStructTuple(typeof<struct (int * int)>.Assembly, [ <@ 1 @>; <@ "a" @> ]) - - Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. - - - - Builds record-construction expressions - - The type of record. - The list of elements of the record. - - The resulting expression. - - - - open FSharp.Quotations - - type R = { Y: int; X: string } - - Expr.NewRecord(typeof<R>, [ <@ 1 @>; <@ "a" @> ]) - - Evaluates to a quotation with the same structure as <@ { Y = 1; X = "a" } @>. - - - - Builds an expression that represents the invocation of an object constructor - - The description of the constructor. - The list of arguments to the constructor. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let ctorInfo = - match <@ new System.DateTime(100L) @> with - | NewObject(ci, _) -> ci - | _ -> failwith "call expected" - - let argExpr = <@ 100000L @> - - Expr.NewObject(ctorInfo, [argExpr]) - - Evaluates to a quotation with the same structure as <@ NewObject (DateTime, Value (100000L)) @>. - - - - Builds an expression that represents the creation of a delegate value for the given type - - The type of delegate. - The parameters for the delegate. - The body of the function. - - The resulting expression. - - - - open System - open FSharp.Quotations - - let vVar = Var("v", typeof<int>) - let vExpr = Expr.Var(vVar) - - Expr.NewDelegate(typeof<Func<int,int>>, [vVar], vExpr) - - Evaluates to a quotation with the same structure as <@ new System.Func<int, int>(fun v -> v) @>. - - - - Builds an expression that represents the creation of an array value initialized with the given elements - - The type for the elements of the array. - The list of elements of the array. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.NewArray(typeof<int>, [ <@ 1 @>; <@ 2 @> ]) - - Evaluates to a quotation with the same structure as <@ [| 1; 2 |] @>. - - - - Builds recursive expressions associated with 'let rec' constructs - - The list of bindings for the let expression. - The sub-expression where the bindings are in scope. - - The resulting expression. - - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let fVar = Var("f", typeof<int -> int>) - let gVar = Var("v", typeof<int -> int>) - let fExpr = Expr.Var(fVar) - let gExpr = Expr.Var(gVar) - let fImplExpr = <@ fun x -> (%%gExpr : int -> int) (x - 1) + 1 @> - let gImplExpr = <@ fun x -> if x > 0 then (%%fExpr : int -> int) (x - 1) else 0 @> - let bodyExpr = <@ (%%gExpr : int -> int) 10 @> - - Expr.LetRecursive([(fVar, fImplExpr); (gVar, gImplExpr)], bodyExpr) - - Evaluates to a quotation with the same structure as <@ let rec f x = g (x-1) + 1 and g x = if x > 0 then f (x - 1) else 0 in g 10 @>. - - - - Builds expressions associated with 'let' constructs - - The variable in the let expression. - The expression bound to the variable. - The sub-expression where the binding is in scope. - - The resulting expression. - - - - open FSharp.Quotations - - let vVar = Var("v", typeof<int>) - let rhsExpr = <@ 6 @> - let vExpr = Expr.Var(vVar) - - Expr.Let(vVar, rhsExpr, vExpr) - - Evaluates to a quotation with the same structure as <@ let v = 6 in v @>. - - - - Builds an expression that represents the construction of an F# function value - - The parameter to the function. - The body of the function. - - The resulting expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let vVar = Var("v", typeof<int>) - let vExpr = Expr.Var(vVar) - - Expr.Lambda(vVar, vExpr) - - Evaluates to Lambda (v, v). - - - - Builds 'if ... then ... else' expressions. - - The condition expression. - The then sub-expression. - The else sub-expression. - - The resulting expression. - - - - open FSharp.Quotations - - let guardExpr = <@ 1 > 3 @> - let thenExpr = <@ 6 @> - let elseExpr = <@ 7 @> - - Expr.IfThenElse(guardExpr, thenExpr, elseExpr) - - Evaluates to a quotation with the same structure as <@ if 1 > 3 then 6 else 7 @>. - - - - Fetches or creates 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 explicit or inferred type parameter - - The variable name. - - The created of fetched typed global variable. - - - - open FSharp.Quotations - - let expr1 = Expr.GlobalVar<int>("x") - let expr2 = Expr.GlobalVar<int>("x") - - Evaluates expr1 and expr2 to identical quotations. - - - - Gets the free expression variables of an expression as a list. - A sequence of the free variables in the expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let sampleQuotation = <@ fun v -> v * v @> - - let v, body = - match sampleQuotation with - | Lambda(v, body) -> (v, body) - | _ -> failwith "unreachable" - - body.GetFreeVars() - - Evaluates to a set containing the single variable for v - - - - Builds a 'for i = ... to ... do ...' expression that represent loops over integer ranges - - The sub-expression declaring the loop variable. - The sub-expression setting the initial value of the loop variable. - The sub-expression declaring the final value of the loop variable. - The sub-expression representing the body of the loop. - - The resulting expression. - - - - open FSharp.Quotations - - let loopVariable = Var("x", typeof<int>) - let startExpr = <@ 6 @> - let endExpr = <@ 7 @> - let body = <@ System.Console.WriteLine("hello") @> - - Expr.ForIntegerRangeLoop(loopVariable, startExpr, endExpr, body) - - Evaluates to a quotation with the same structure as <@ if 1 > 3 then 6 else 7 @>. - - - - Builds an expression that represents writing to a field of an object - - The input object. - The description of the field to write to. - The value to set to the field. - - The resulting expression. - - Create an expression setting a reference cell via the public backing field: - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let fieldInfo = typeof<int ref>.GetField("contents@") - let refValue = ref 3 - let refExpr = <@ refValue @> - let valueExpr = <@ 6 @> - - Expr.FieldSet(refExpr, fieldInfo, valueExpr) - - Evaluates to FieldSet (Some (PropertyGet (None, refValue, [])), contents@, Value (6)). - Note that for technical reasons the quotation <@ refValue.contents <- 6 @> evaluates to a slightly different quotation - accessing the contents field via a property. - - - - Builds an expression that represents writing to a static field - - The description of the field to write to. - The value to the set to the field. - - The resulting expression. - - Settable public static fields are rare in F# and .NET libraries, so examples of using this method are uncommon. - - - Builds an expression that represents the access of a field of an object - - The input object. - The description of the field to access. - - The resulting expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let fieldInfo = typeof<int ref>.GetField("contents@") - let refValue = ref 3 - let refExpr = <@ refValue @> - - Expr.FieldGet(refExpr, fieldInfo) - - Evaluates to FieldGet (Some (PropertyGet (None, refValue, [])), contents@). - Note that for technical reasons the quotation <@ refValue.contents @> evaluates to a different quotation - accessing the contents field via a property. - - - - Builds an expression that represents the access of a static field - - The description of the field to access. - - The resulting expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let fieldInfo = typeof<System.DayOfWeek>.GetField("Monday") - - Expr.FieldGet(fieldInfo) - - Evaluates to FieldGet (None, Monday). Note that for technical reasons the quotation <@ System.DayOfWeek.Monday @> evaluates to a different quotation containing a constant enum value Value (Monday). - - - - This function is called automatically when quotation syntax (<@ @>) and other sources of - quotations are used. - - A type in the assembly where the quotation occurs. - The type definitions referenced. - The spliced types, to replace references to type variables. - The spliced expressions to replace references to spliced expressions. - The serialized form of the quoted expression. - - The resulting expression. - - - This function is called automatically when quotation syntax (<@ @>) and other sources of - quotations are used. - - A type in the assembly where the quotation occurs. - The spliced types, to replace references to type variables. - The spliced expressions to replace references to spliced expressions. - The serialized form of the quoted expression. - - The resulting expression. - - - Builds an expression that represents the invocation of a default object constructor - - The type on which the constructor is invoked. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.DefaultValue(typeof<int>) - - Evaluates to the quotation DefaultValue (Int32). - - - - Builds an expression that represents the coercion of an expression to a type - - The expression to coerce. - The target type. - - The resulting expression. - - - - open FSharp.Quotations - - let expr = <@ box "3" @> - - Expr.Coerce(expr, typeof<string>) - - Evaluates to a quotation with the same structure as <@ (fun x -> x + 1) 3 @>. - - - - Returns 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. - - The expression to cast. - - The resulting typed expression. - - - - open FSharp.Quotations - - let rawExpr = <@ 1 @> - - Expr.Cast<int>(rawExpr) - - Evaluates with type Expr<int>. - - - - Builds an expression that represents a call to an instance method associated with an object, potentially passing additional witness arguments - - The input object. - The description of the method to call. - The additional MethodInfo describing the method to call, accepting witnesses. - The list of witnesses to the method. - The list of arguments to the method. - - The resulting expression. - - See examples for Call and CallWithWitnesses - - - Builds an expression that represents a call to an static method or module-bound function, potentially passing additional witness arguments - - The MethodInfo describing the method to call. - The additional MethodInfo describing the method to call, accepting witnesses. - The list of witnesses to the method. - The list of arguments to the method. - - The resulting expression. - - In this example, we show how to use a witness to cosntruct an `op_Addition` call for a type that doesn't support addition directly: - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - // Get the entrypoint for inline addition that takes an explicit witness - let addMethInfoG, addMethInfoGW = - match <@ 1+1 @> with - | CallWithWitnesses(None, mi, miW, _, _) -> - mi.GetGenericMethodDefinition(), miW.GetGenericMethodDefinition() - | _ -> - failwith "call expected" - - // Make a non-standard witness for addition for a type C - - type C(value: int) = - member x.Value = value - - let witnessExpr = <@ (fun (x: C) (y: C) -> C(x.Value + y.Value)) @> - let argExpr1 = <@ C(4) @> - let argExpr2 = <@ C(5) @> - - // Instantiate the generic method at the right type - - let addMethInfo = addMethInfoG.MakeGenericMethod(typeof<C>, typeof<C>, typeof<C>) - let addMethInfoW = addMethInfoGW.MakeGenericMethod(typeof<C>, typeof<C>, typeof<C>) - - Expr.CallWithWitnesses(addMethInfo, addMethInfoW, [witnessExpr], [argExpr1; argExpr2]) - - Evaluates to a quotation with the same structure as <@ Call (None, op_Addition, [NewObject (C, Value (4)), NewObject (C, Value (5))]) @>. - - - - Builds an expression that represents a call to an instance method associated with an object - - The input object. - The description of the method to call. - The list of arguments to the method. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let objExpr, methInfo = - match <@ Console.Out.WriteLine("1") @> with - | Call(Some obj, mi, _) -> obj, mi - | _ -> failwith "call expected" - - let argExpr = <@ "Hello World" @> - - Expr.Call(objExpr, methInfo, [argExpr]) - - Evaluates to a quotation with the same structure as <@ Console.Out.WriteLine("Hello World") @>. - - - - Builds an expression that represents a call to an static method or module-bound function - - The MethodInfo describing the method to call. - The list of arguments to the method. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let methInfo = - match <@ Console.WriteLine("1") @> with - | Call(_, mi, _) -> mi - | _ -> failwith "call expected" - - let argExpr = <@ "Hello World" @> - - Expr.Call(methInfo, [argExpr]) - - Evaluates to a quotation with the same structure as <@ Console.WriteLine("Hello World") @>. - - - - Builds an expression that represents the application of a first class function value to multiple arguments - - The function to apply. - The list of lists of arguments to the function. - - The resulting expression. - - - - open FSharp.Quotations - - let funcExpr = <@ (fun (x, y) z -> x + y + z) @> - let curriedArgExprs = [[ <@ 1 @>; <@ 2 @> ]; [ <@ 3 @> ]] - - Expr.Applications(funcExpr, curriedArgExprs) - - Evaluates to a quotation with the same structure as <@ (fun (x, y) z -> x + y + z) (1,2) 3 @>. - - - - Builds an expression that represents the application of a first class function value to a single argument. - - The function to apply. - The argument to the function. - - The resulting expression. - - - - open FSharp.Quotations - - let funcExpr = <@ (fun x -> x + 1) @> - let argExpr = <@ 3 @> - - Expr.Application(funcExpr, argExpr) - - Evaluates to a quotation with the same structure as <@ (fun x -> x + 1) 3 @>. - - - - Builds an expression that represents setting the value held at a particular address. - - The target expression. - The value to set at the address. - - The resulting expression. - - - - open FSharp.Quotations - - let array = [| 1; 2; 3 |] - - let addrExpr = Expr.AddressOf(<@ array.[1] @>) - - Expr.AddressSet(addrExpr, <@ 4 @>) - - Evaluates to AddressSet (AddressOf (Call (None, GetArray, [PropertyGet (None, array, []), Value (1)])), Value (4)). - - - - Builds an expression that represents getting the address of a value. - - The target expression. - - The resulting expression. - - - - open FSharp.Quotations - - let array = [| 1; 2; 3 |] - - Expr.AddressOf(<@ array.[1] @>) - - Evaluates to AddressOf (Call (None, GetArray, [PropertyGet (None, array, []), Value (1)])). - - - - Quoted expressions annotated with System.Type values. - - - The type associated with the variable - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - match <@ fun v -> v @> with - | Lambda(v, body) -> v.Type - | _ -> failwith "unreachable" - - Evaluates to typeof<int> - - - - The declared name of the variable - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - match <@ fun v -> v @> with - | Lambda(v, body) -> v.Name - | _ -> failwith "unreachable" - - Evaluates to "v" - - - - Indicates if the variable represents a mutable storage location - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - match <@ fun v -> v @> with - | Lambda(v, body) -> v.IsMutable - | _ -> failwith "unreachable" - - Evaluates to false. - - - - Fetches or create a new variable with the given name and type from a global pool of shared variables - indexed by name and type - - The name of the variable. - The type associated with the variable. - - The retrieved or created variable. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let valueVar1 = Var.Global("value", typeof<int>) - let valueVar2 = Var.Global("value", typeof<int>) - - Evaluates both to valueVar1 and valueVar2 to the same variable from a global pool of shared variables. - - - - Creates a new variable with the given name, type and mutability - - The declared name of the variable. - The type associated with the variable. - Indicates if the variable represents a mutable storage location. Default is false. - - The created variable. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let valueVar = Var("value"), typeof<int>) - - Evaluates to a new quotation variable with the given name and type. - - - - Information at the binding site of a variable - - - Library functionality for F# quotations. - See also F# Code Quotations in the F# Language Guide. - - - - Re-build combination expressions. The first parameter should be an object - returned by the ShapeCombination case of the active pattern in this module. - - The input shape. - The list of arguments. - - The rebuilt expression. - - - - - An active pattern that performs a complete decomposition viewing the expression tree as a binding structure - - The input expression. - - The decomposed Var, Lambda, or ConstApp. - - - - - Active patterns for traversing, visiting, rebuilding and transforming expressions in a generic way - - - An active pattern to recognize property setters that have an associated ReflectedDefinition - - The description of the property. - - The expression of the method definition if found, or None. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - [<ReflectedDefinition>] - type C<'T>() = - member x.Count with set (v: int) = () - - let inpExpr = <@ C<int>().Count <- 3 @> - - let implExpr = - match inpExpr with - | PropertySet(Some _, PropertySetterWithReflectedDefinition implExpr, [], _valueExpr) -> implExpr - | _ -> failwith "unexpected" - - Evaluates implExpr to a quotation with the same structure as <@ fun (x: C<int>) (v: int) -> () @>, which is the implementation of the - setter for the property Count. Note that the correct generic instantaition has been applied to the implementation to reflect - the the type at the callsite. - - - - - An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition - - The description of the property. - - The expression of the method definition if found, or None. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - [<ReflectedDefinition>] - type C<'T>() = - member x.Identity = x - - let inpExpr = <@ C<int>().Identity @> - - let implExpr = - match inpExpr with - | PropertyGet(Some _, PropertyGetterWithReflectedDefinition implExpr, [ ]) -> implExpr - | _ -> failwith "unexpected" - - Evaluates implExpr to a quotation with the same structure as <@ fun (x: C<int>) () -> x @>, which is the implementation of the - property Identity. Note that the correct generic instantaition has been applied to the implementation to reflect - the the type at the callsite. - - - - - An active pattern to recognize methods that have an associated ReflectedDefinition - - The description of the method. - - The expression of the method definition if found, or None. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - [<ReflectedDefinition>] - let f x = (x, x) - - let inpExpr = <@ f 4 @> - - let implExpr = - match inpExpr with - | Call(None, MethodWithReflectedDefinition implExpr, [ _argExpr ]) -> implExpr - | _ -> failwith "unexpected" - - Evaluates implExpr to a quotation with the same structure as <@ fun (x: int) -> (x, x) @>, which is the implementation of the - method f. Note that the correct generic instantaition has been applied to the implementation to reflect - the the type at the callsite. - - - - - A parameterized active pattern to recognize calls to a specified function or method. - The returned elements are the optional target object (present if the target is an - instance method), the generic type instantiation (non-empty if the target is a generic - instantiation), and the arguments to the function or method. - - The input template expression to specify the method to call. - - The optional target object (present if the target is an - instance method), the generic type instantiation (non-empty if the target is a generic - instantiation), and the arguments to the function or method. - - Match a specific call to Console.WriteLine taking one string argument: - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - let inpExpr = <@ Console.WriteLine("hello") @> - - match inpExpr with - | SpecificCall <@ Console.WriteLine("1") @> (None, [], [ argExpr ]) -> argExpr - | _ -> failwith "unexpected" - - Evaluates to a quotation with the same structure as <@ "hello" @>. - - - Calls to this active pattern can be partially applied to pre-evaluate some aspects of the matching. For example: - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - let (|ConsoleWriteLineOneArg|_|) = (|SpecificCall|_|) <@ Console.WriteLine("1") @> - - let inpExpr = <@ Console.WriteLine("hello") @> - - match inpExpr with - | ConsoleWriteLineOneArg (None, [], [ argExpr ]) -> argExpr - | _ -> failwith "unexpected" - - Evaluates to a quotation with the same structure as <@ "hello" @>. - - - - An active pattern to recognize constant decimal expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8.0M @> with - | Decimal v -> v - | _ -> failwith "unexpected" - - Evaluates to 8.0M. - - - - An active pattern to recognize constant unsigned int64 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8UL @> with - | UInt64 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8UL. - - - - An active pattern to recognize constant int64 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8L @> with - | Int64 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8L. - - - - An active pattern to recognize constant unsigned int32 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8u @> with - | UInt32 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8u. - - - - An active pattern to recognize constant int32 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8 @> with - | Int32 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8. - - - - An active pattern to recognize constant unsigned int16 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8us @> with - | UInt16 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8us. - - - - An active pattern to recognize constant int16 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8s @> with - | Int16 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8s. - - - - An active pattern to recognize constant byte expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8uy @> with - | Byte v -> v - | _ -> failwith "unexpected" - - Evaluates to 8uy. - - - - An active pattern to recognize constant signed byte expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8y @> with - | SByte v -> v - | _ -> failwith "unexpected" - - Evaluates to 8y. - - - - An active pattern to recognize constant unicode character expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 'a' @> with - | Char v -> v - | _ -> failwith "unexpected" - - Evaluates to 'a'. - - - - An active pattern to recognize constant 64-bit floating point number expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 1.0 @> with - | Double v -> v - | _ -> failwith "unexpected" - - Evaluates to 1.0. - - - - An active pattern to recognize constant 32-bit floating point number expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 1.0f @> with - | Single v -> v - | _ -> failwith "unexpected" - - Evaluates to 1.0f. - - - - An active pattern to recognize constant string expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ "a" @> with - | String v -> v - | _ -> failwith "unexpected" - - Evaluates to "a". - - - - An active pattern to recognize constant boolean expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ true @> with - | Bool v -> v - | _ -> failwith "unexpected" - - Evaluates to true. - - - - An active pattern to recognize () constant expressions - - The input expression to match against. - - When successful, the pattern does not bind any results - - - - open FSharp.Quotations.DerivedPatterns - - match <@ () @> with - | Unit v -> v - | _ -> failwith "unexpected" - - Evaluates to true. - - - - An active pattern to recognize expressions of the form a || b - - The input expression to match against. - - When successful, the pattern binds the left and right parts of the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ true || false @> with - | OrElse (a, b) -> (a, b) - | _ -> failwith "unexpected" - - Evaluates to <@ true @>, <@ false @>. - - - - An active pattern to recognize expressions of the form a && b - - The input expression to match against. - - When successful, the pattern binds the left and right parts of the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ true && false @> with - | AndAlso (a, b) -> (a, b) - | _ -> failwith "unexpected" - - Evaluates to <@ true @>, <@ false @>. - - - - An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value - - The input expression to match against. - - When successful, the pattern binds the function and curried arguments of the input expression - - - - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - match <@ (fun f -> f (1, 2) 3) @> with - | Lambda(_, Applications (f, curriedArgs)) -> - curriedArgs |> List.map (fun args -> args.Length) - | _ -> failwith "unexpected" - - Evaluates to [2; 1]. - - - - An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value - - The input expression to match against. - - When successful, the pattern binds the curried variables and body of the input expression - - - - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - match <@ (fun (a1, a2) b -> ()) @> with - | Lambdas(curriedVars, _) -> - curriedVars |> List.map (List.map (fun arg -> arg.Name)) - | _ -> failwith "unexpected" - - Evaluates to [["a1"; "a2"]; ["b"]]. - - - - Contains a set of derived F# active patterns to analyze F# expression objects - - - An active pattern to recognize expressions that represent setting a mutable variable - - The input expression to match against. - - When successful, the pattern binds the variable and value expression of the input expression - - - - - An active pattern to recognize expressions that represent a variable - - The input expression to match against. - - When successful, the pattern binds the variable of the input expression - - - - - An active pattern to recognize expressions that are a value with an associated definition - - The input expression to match against. - - When successful, the pattern binds the boxed value, its static type and its definition - - - - - An active pattern to recognize expressions that represent a constant value - - The input expression to match against. - - When successful, the pattern binds the boxed value, its static type and its name - - - - - An active pattern to recognize expressions that represent a constant value. This also matches expressions matched by ValueWithName. - - The input expression to match against. - - When successful, the pattern binds the boxed value and its static type - - - - - An active pattern to recognize expressions that represent a test if a value is of a particular union case - - The input expression to match against. - - When successful, the pattern binds the expression and union case being tested - - - - - An active pattern to recognize expressions that represent a dynamic type test - - The input expression to match against. - - When successful, the pattern binds the expression and type being tested - - - - - An active pattern to recognize expressions that represent getting a tuple field - - The input expression to match against. - - When successful, the pattern binds the expression and tuple field being accessed - - - - - An active pattern to recognize expressions that represent a try/finally construct - - The input expression to match against. - - When successful, the pattern binds the body and handler parts of the try/finally expression - - - - - An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching - - The input expression to match against. - - When successful, the pattern binds the body, exception variable, filter expression and catch expression of the input expression - - - - - An active pattern to recognize expressions that represent sequential execution of one expression followed by another - - The input expression to match against. - - When successful, the pattern binds the two sub-expressions of the input expression - - - - - An active pattern to recognize expressions that represent a nested typed quotation literal - - The input expression to match against. - - When successful, the pattern binds the nested quotation expression of the input expression - - - - - An active pattern to recognize expressions that represent a nested raw quotation literal - - The input expression to match against. - - When successful, the pattern binds the nested quotation expression of the input expression - - - - - An active pattern to recognize expressions that represent a nested quotation literal - - The input expression to match against. - - When successful, the pattern binds the nested quotation expression of the input expression - - - - - An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module - - The input expression to match against. - - When successful, the pattern binds the object, property, indexer arguments and setter value of the input expression - - - - - 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 - - The input expression to match against. - - When successful, the pattern binds the object, property and indexer arguments of the input expression - - - - - An active pattern to recognize expressions that represent construction of struct tuple values - - The input expression to match against. - - When successful, the pattern binds the element expressions of the input expression - - - - - An active pattern to recognize expressions that represent construction of tuple values - - The input expression to match against. - - When successful, the pattern binds the element expressions of the input expression - - - - - An active pattern to recognize expressions that represent construction of particular union case values - - The input expression to match against. - - When successful, the pattern binds the union case and field values of the input expression - - - - - An active pattern to recognize expressions that represent construction of record values - - The input expression to match against. - - When successful, the pattern binds the record type and field values of the input expression - - - - - An active pattern to recognize expressions that represent invocation of object constructors - - The input expression to match against. - - When successful, the pattern binds the constructor and arguments of the input expression - - - - - An active pattern to recognize expressions that represent construction of delegate values - - The input expression to match against. - - When successful, the pattern binds the delegate type, argument parameters and body of the input expression - - - - - An active pattern to recognize expressions that represent invocations of a default constructor of a struct - - The input expression to match against. - - When successful, the pattern binds the relevant type of the input expression - - - - - An active pattern to recognize expressions that represent the construction of arrays - - The input expression to match against. - - When successful, the pattern binds the element type and values of the input expression - - - - - An active pattern to recognize expressions that represent recursive let bindings of one or more variables - - The input expression to match against. - - When successful, the pattern binds the bindings and body of the input expression - - - - - An active pattern to recognize expressions that represent let bindings - - The input expression to match against. - - When successful, the pattern binds the variable, binding expression and body of the input expression - - - - - An active pattern to recognize expressions that represent first class function values - - The input expression to match against. - - When successful, the pattern binds the variable and body of the input expression - - - - - An active pattern to recognize expressions that represent conditionals - - The input expression to match against. - - When successful, the pattern binds the condition, then-branch and else-branch of the input expression - - - - - An active pattern to recognize expressions that represent while loops - - The input expression to match against. - - When successful, the pattern binds the guard and body of the input expression - - - - - An active pattern to recognize expressions that represent loops over integer ranges - - The input expression to match against. - - When successful, the pattern binds the value, start, finish and body of the input expression - - - - - An active pattern to recognize expressions that represent setting a static or instance field - - The input expression to match against. - - When successful, the pattern binds the object, field and value of the input expression - - - - - An active pattern to recognize expressions that represent getting a static or instance field - - The input expression to match against. - - When successful, the pattern binds the object and field of the input expression - - - - - An active pattern to recognize expressions that represent coercions from one type to another - - The input expression to match against. - - When successful, the pattern binds the source expression and target type of the input expression - - - - - An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules, including witness arguments - - The input expression to match against. - - When successful, the pattern binds the object, method, witness-argument and argument sub-expressions of the input expression - - - - - An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules - - The input expression to match against. - - When successful, the pattern binds the object, method and argument sub-expressions of the input expression - - - - - An active pattern to recognize expressions that represent applications of first class function values - - The input expression to match against. - - When successful, the pattern binds the function and argument of the input expression - - - - - An active pattern to recognize expressions that represent setting the value held at an address - - The input expression to match against. - - When successful, the pattern binds the target and value expressions of the input expression - - - - - An active pattern to recognize expressions that represent getting the address of a value - - The input expression to match against. - - When successful, the pattern binds the sub-expression of the input AddressOf expression - - - - - Contains a set of primitive F# active patterns to analyze F# expression objects - - - Copies a block of memory to a specified destination address starting from a specified source address until a specified byte count of (count * sizeof<'T>). - - The destination pointer. - The source pointer. - The source pointer. - - - - - Copies a value to a specified destination address from a specified source address. - - The destination pointer. - The source pointer. - - - - - Initializes a specified block of memory starting at a specific address to a given byte count and initial byte value. - - The input pointer. - The initial byte value. - The total repeat count of the byte value. - - - - - Clears the value stored at the location of a given native pointer. - - The input pointer. - - - - - Tests whether the given native pointer is null. - - The input pointer. - - Whether the given native pointer is null. - - - - - Gets the null native pointer. - - The null native pointer. - - - - - Allocates a region of memory on the stack. - - The number of objects of type T to allocate. - - A typed pointer to the allocated memory. - - - - - Assigns the value into the memory location referenced by the typed native - pointer computed by adding index * sizeof<'T> to the given input pointer. - - The input pointer. - The index by which to offset the pointer. - The value to assign. - - - - - Assigns the value into the memory location referenced by the given typed native pointer. - - The input pointer. - The value to assign. - - - - - Dereferences the given typed native pointer. - - The input pointer. - - The value at the pointer address. - - - - - Dereferences the typed native pointer computed by adding index * sizeof<'T> to the - given input pointer. - - The input pointer. - The index by which to offset the pointer. - - The value at the pointer address. - - - - - Returns a typed native pointer by adding index * sizeof<'T> to the - given input pointer. - - The input pointer. - The index by which to offset the pointer. - - A typed pointer. - - - - - Converts a given typed native pointer to a managed pointer. - - The typed native pointer. - - The managed pointer. - - - - - Returns a Common IL (Intermediate Language) signature pointer for a given typed native pointer. - - The typed native pointer. - - A Common IL signature pointer. - - - - - Returns a typed native pointer for a Common IL (Intermediate Language) signature pointer. - - The Common IL signature pointer. - - A typed native pointer. - - - - - Returns an untyped native pointer for a given typed native pointer. - - The typed native pointer. - - An untyped native pointer. - - - - - Returns a typed native pointer for a untyped native pointer. - - The untyped native pointer. - - A typed native pointer. - - - - - Returns a machine address for a given typed native pointer. - - The typed native pointer. - - The machine address. - - - - - Returns a typed native pointer for a given machine address. - - The machine address. - - A typed native pointer. - - - - - Contains operations on native pointers. Use of these operators may - result in the generation of unverifiable code. - - - Library functionality for native interopability. See - also F# External Functions in - the F# Language Guide. - - - - First-class listening points (i.e. objects that permit you to register a callback - activated when the event is triggered). - - Events and Observables - - - A delegate type associated with the F# event type IEvent<_> - - The object that fired the event. - The event arguments. - - Events and Observables - - - First class event values for CLI events conforming to CLI Framework standards. - - Events and Observables - - - Remove a listener delegate from an event listener store. - - The delegate to be removed from the 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. - - A delegate to be invoked when the event is fired. - - - - - First class event values for arbitrary delegate types. - - F# gives special status to member properties compatible with type IDelegateEvent and - tagged with the CLIEventAttribute. In this case the F# compiler generates appropriate - CLI metadata to make the member appear to other CLI languages as a CLI event. - - Events and Observables - - - 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 type . - - Lazy Computation - - - Publishes the event as a first class value. - - - - - Triggers the event using the given parameters. - - The event parameters. - - - - - Creates an observable object. - The created event. - - - - - Event implementations for the IEvent<_> type. - - Events and Observables - - - Publishes the event as a first class event value. - - - - - Triggers the event using the given sender object and parameters. The sender object may be null. - - The object triggering the event. - The parameters for the event. - - - - - Creates an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument. - The created event. - - - - - Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument. - - Events and Observables - - - Publishes the event as a first class event value. - - - - - Triggers the event using the given parameters. - The parameters for the event. - - - - - Creates an event object suitable for implementing an arbitrary type of delegate. - The event object. - - - - - Event implementations for an arbitrary type of delegate. - - Events and Observables - - - Creates an asynchronous computation that just returns (). - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of empty else branches in the - async { ... } computation expression syntax. - An asynchronous computation that returns (). - - - - - Creates an asynchronous computation that runs computation repeatedly - until guard() becomes false. - - A cancellation check is performed whenever the computation is executed. - - The existence of this method permits the use of while in the - async { ... } computation expression syntax. - - The function to determine when to stop executing computation. - The function to be executed. Equivalent to the body - of a while expression. - - An asynchronous computation that behaves similarly to a while loop when run. - - - - - Creates an asynchronous computation that runs binder(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. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of use and use! in the - async { ... } computation expression syntax. - - The resource to be used and disposed. - The function that takes the resource and returns an asynchronous - computation. - - An asynchronous computation that binds and eventually disposes resource. - - - - - Creates an asynchronous computation that runs computation and returns its result. - If an exception happens then catchHandler(exn) is called and the resulting computation executed instead. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of try/with in the - async { ... } computation expression syntax. - - The input computation. - The function to run when computation throws an exception. - - An asynchronous computation that executes computation and calls catchHandler if an - exception is thrown. - - - - - Creates an asynchronous computation that runs computation. The action compensation is executed - after computation completes, whether computation exits normally or by an exception. If compensation raises an exception itself - the original exception is discarded and the new exception becomes the overall result of the computation. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of try/finally in the - async { ... } computation expression syntax. - - The input computation. - The action to be run after computation completes or raises an - exception (including cancellation). - - An asynchronous computation that executes computation and compensation afterwards or - when an exception is raised. - - - - - Delegates to the input computation. - - The existence of this method permits the use of return! in the - async { ... } computation expression syntax. - - The input computation. - - The input computation. - - - - - Creates an asynchronous computation that returns the result v. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of return in the - async { ... } computation expression syntax. - - The value to return from the computation. - - An asynchronous computation that returns value when executed. - - - - - Creates an asynchronous computation that enumerates the sequence seq - on demand and runs body for each element. - - A cancellation check is performed on each iteration of the loop. - - The existence of this method permits the use of for in the - async { ... } computation expression syntax. - - The sequence to enumerate. - A function to take an item from the sequence and create - an asynchronous computation. Can be seen as the body of the for expression. - - An asynchronous computation that will enumerate the sequence and run body - for each element. - - - - - Creates an asynchronous computation that runs generator. - - A cancellation check is performed when the computation is executed. - - The function to run. - - An asynchronous computation that runs generator. - - - - - Creates an asynchronous computation that first runs computation1 - and then runs computation2, returning the result of computation2. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of expression sequencing in the - async { ... } computation expression syntax. - - The first part of the sequenced computation. - The second part of the sequenced computation. - - An asynchronous computation that runs both of the computations sequentially. - - - - - Creates an asynchronous computation that runs computation, and when - computation generates a result T, runs binder res. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of let! in the - async { ... } computation expression syntax. - - The computation to provide an unbound result. - The function to bind the result of computation. - - An asynchronous computation that performs a monadic bind on the result - of computation. - - - - - - Generate an object used to build asynchronous computations using F# computation expressions. The value - 'async' is a pre-defined instance of this type. - - A cancellation check is performed when the computation is executed. - - - - The type of the async operator, used to build workflows for asynchronous computations. - - Async Programming - - - The F# compiler emits calls to this function to implement F# async expressions. - - A value indicating asynchronous execution. - - - - - The F# compiler emits calls to this function to implement F# async expressions. - - A value indicating asynchronous execution. - - - - - - Used by MailboxProcessor - - - - The F# compiler emits calls to this function to implement F# async expressions. - - A value indicating asynchronous execution. - - - - - The F# compiler emits calls to this function to implement F# async expressions. - - - - - The F# compiler emits calls to this function to implement F# async expressions. - - A value indicating asynchronous execution. - - - - - - Used by MailboxProcessor - - - - The F# compiler emits references to this type to implement F# async expressions. - - Async Internals - - - The F# compiler emits references to this type to implement F# async expressions. - - Async Internals - - - Gets the default cancellation token for executing asynchronous computations. - - The default CancellationToken. - - Cancellation and Exceptions - - - - Async.DefaultCancellationToken.Register(fun () -> printfn "Computation Cancelled") |> ignore - let primes = [ 2; 3; 5; 7; 11 ] - - for i in primes do - async { - do! Async.Sleep(i * 1000) - printfn $"{i}" - } - |> Async.Start - - Thread.Sleep(6000) - Async.CancelDefaultToken() - printfn "Tasks Finished" - - This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation and then - print "Computation Cancelled", followed by "Tasks Finished". - - - - Creates an asynchronous computation that returns the CancellationToken governing the execution - of the computation. - - In async { let! token = Async.CancellationToken ...} token can be used to initiate other - asynchronous operations that will cancel cooperatively with this workflow. - - An asynchronous computation capable of retrieving the CancellationToken from a computation - expression. - - Cancellation and Exceptions - - - - - Creates an asynchronous computation that executes computation. - If this computation is cancelled before it completes then the computation generated by - running compensation is executed. - - The input asynchronous computation. - The function to be run if the computation is cancelled. - - An asynchronous computation that runs the compensation if the input computation - is cancelled. - - Cancellation and Exceptions - - - - let primes = [ 2; 3; 5; 7; 11 ] - for i in primes do - Async.TryCancelled( - async { - do! Async.Sleep(i * 1000) - printfn $"{i}" - }, - fun oce -> printfn $"Computation Cancelled: {i}") - |> Async.Start - - Thread.Sleep(6000) - Async.CancelDefaultToken() - printfn "Tasks Finished" - - This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation - and then print "Computation Cancelled: 7", "Computation Cancelled: 11" and "Tasks Finished" in any order. - - - - Creates an asynchronous computation that queues a work item that runs - its continuation. - - A computation that generates a new work item in the thread pool. - - Threads and Contexts - - - - async { - do! Async.SwitchToNewThread() - do! someLongRunningComputation() - do! Async.SwitchToThreadPool() - - for i in 1 .. 10 do - do! someShortRunningComputation() - } |> Async.StartImmediate - - This will run someLongRunningComputation() without blocking the threads in the threadpool, and then switch to the - threadpool for shorter computations. - - - - Creates an asynchronous computation that creates a new thread and runs - its continuation in that thread. - - A computation that will execute on a new thread. - - Threads and Contexts - - - - async { - do! Async.SwitchToNewThread() - do! someLongRunningComputation() - } |> Async.StartImmediate - - This will run someLongRunningComputation() without blocking the threads in the threadpool. - - - - Creates an asynchronous computation that runs - its continuation using syncContext.Post. If syncContext is null - then the asynchronous computation is equivalent to SwitchToThreadPool(). - - The synchronization context to accept the posted computation. - - An asynchronous computation that uses the syncContext context to execute. - - Threads and Contexts - - - - - - - - Runs an asynchronous computation, starting immediately on the current operating system - thread. Call one of the three continuations when the operation completes. - - If no cancellation token is provided then the default cancellation token - is used. - - The asynchronous computation to execute. - The function called on success. - The function called on exception. - The function called on cancellation. - The CancellationToken to associate with the computation. - The default is used if this parameter is not provided. - - Starting Async Computations - - - - - Runs an asynchronous computation, starting immediately on the current operating system - thread, but also returns the execution as - - - If no cancellation token is provided then the default cancellation token is used. - You may prefer using this method if you want to achive a similar behviour to async await in C# as - async computation starts on the current thread with an ability to return a result. - - - The asynchronous computation to execute. - The CancellationToken to associate with the computation. - The default is used if this parameter is not provided. - - A that will be completed - in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) - - Starting Async Computations - - - - printfn "A" - - let t = - async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - } |> Async.StartImmediateAsTask - - printfn "D" - t.Wait() - printfn "E" - - Prints "A", "B", "D" immediately, then "C", "E" in 1 second. - - - - Runs an asynchronous computation, starting immediately on the current operating system - thread. - - If no cancellation token is provided then the default cancellation token is used. - - The asynchronous computation to execute. - The CancellationToken to associate with the computation. - The default is used if this parameter is not provided. - - Starting Async Computations - - - - printfn "A" - - async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - } |> Async.StartImmediate - - printfn "D" - - Prints "A", "B", "D" immediately, then "C" in 1 second - - - - Creates an asynchronous computation which starts the given computation as a - - Starting Async Computations - - - - - Starts 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, that is, - - 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. - - The child computation. - The timeout value in milliseconds. If one is not provided - then the default value of -1 corresponding to . - - A new computation that waits for the input computation to finish. - - Cancellation and Exceptions - - - - - let computeWithTimeout timeout = - async { - let! completor1 = - Async.StartChild( - (async { - do! Async.Sleep(1000) - return 1 - }), - millisecondsTimeout = timeout) - - let! completor2 = - Async.StartChild( - (async { - do! Async.Sleep(2000) - return 2 - }), - millisecondsTimeout = timeout) - - let! v1 = completor1 - let! v2 = completor2 - printfn $"Result: {v1 + v2}" - } |> Async.RunSynchronously - - Will throw a System.TimeoutException if called with a timeout less than 2000, otherwise will print "Result: 3". - - - - Executes a computation in the thread pool. - - If no cancellation token is provided then the default cancellation token is used. - - A that will be completed - in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) - - Starting Async Computations - - - - printfn "A" - - let t = - async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - } |> Async.StartAsTask - - printfn "D" - t.Wait() - printfn "E" - - Prints "A", then "D", "B" quickly in any order, then "C", "E" in 1 second. - - - - Starts the asynchronous computation in the thread pool. Do not await its result. - - If no cancellation token is provided then the default cancellation token is used. - - The computation to run asynchronously. - The cancellation token to be associated with the computation. - If one is not supplied, the default cancellation token is used. - - Starting Async Computations - - - - printfn "A" - - async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - } |> Async.Start - - printfn "D" - - Prints "A", then "D", "B" quickly in any order, and then "C" in 1 second. - - - - - - Creates an asynchronous computation that will sleep for the given time. This is scheduled - using a System.Threading.Timer object. The operation will not block operating system threads - for the duration of the wait. - - - The amount of time to sleep. - - An asynchronous computation that will sleep for the given time. - - Thrown when the due time is negative. - - Awaiting Results - - - - async { - printfn "A" - do! Async.Sleep(TimeSpan(0, 0, 1)) - printfn "B" - } |> Async.Start - printfn "C" - - Prints "C", then "A" quickly, and then "B" 1 second later. - - - - - Creates an asynchronous computation that will sleep for the given time. This is scheduled - using a System.Threading.Timer object. The operation will not block operating system threads - for the duration of the wait. - - - The number of milliseconds to sleep. - - An asynchronous computation that will sleep for the given time. - - Thrown when the due time is negative - and not infinite. - - Awaiting Results - - - - async { - printfn "A" - do! Async.Sleep(1000) - printfn "B" - } |> Async.Start - - printfn "C" - - Prints "C" and "A" quickly in any order, and then "B" 1 second later - - - - Creates an asynchronous computation that executes all the given asynchronous computations sequentially. - - If all child computations succeed, an array of results is passed to the success continuation. - - If any child computation raises an exception, then the overall computation will trigger an - exception, and cancel the others. - - The overall computation will respond to cancellation while executing the child computations. - If cancelled, the computation will cancel any remaining child computations but will still wait - for the other child computations to complete. - - A sequence of distinct computations to be run in sequence. - - A computation that returns an array of values from the sequence of input computations. - - Composing Async Computations - - - - let primes = [ 2; 3; 5; 7; 10; 11 ] - let computations = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - - if i % 2 > 0 then - printfn $"{i}" - return true - else - return false - } - ] - - let t = - Async.Sequential(computations) - |> Async.StartAsTask - - t.Wait() - printfn $"%A{t.Result}" - - This will print "3", "5", "7", "11" with ~1-2 seconds between them except for pauses where even numbers would be and then - prints [| false; true; true; true; false; true |]. - - - - Runs the asynchronous computation and await its result. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - If no cancellation token is provided then the default cancellation token is used. - - The computation is started on the current thread if is null, - has - of true, and no timeout is specified. Otherwise the computation is started by queueing a new work item in the thread pool, - and the current thread is blocked awaiting the completion of the computation. - - The timeout parameter is given in milliseconds. A value of -1 is equivalent to - . - - - The computation to run. - The amount of time in milliseconds to wait for the result of the - computation before raising a . If no value is provided - for timeout then a default of -1 is used to correspond to . - The cancellation token to be associated with the computation. - If one is not supplied, the default cancellation token is used. - - The result of the computation. - - Starting Async Computations - - - - printfn "A" - - let result = async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - 17 - } |> Async.RunSynchronously - - printfn "D" - - Prints "A", "B" immediately, then "C", "D" in 1 second. result is set to 17. - - - - Creates an asynchronous computation that executes all the given asynchronous computations, - initially queueing each as work items and using a fork/join pattern. - - If all child computations succeed, an array of results is passed to the success continuation. - - If any child computation raises an exception, then the overall computation will trigger an - exception, and cancel the others. - - The overall computation will respond to cancellation while executing the child computations. - If cancelled, the computation will cancel any remaining child computations but will still wait - for the other child computations to complete. - - A sequence of distinct computations to be parallelized. - The maximum degree of parallelism in the parallel execution. - - A computation that returns an array of values from the sequence of input computations. - - Composing Async Computations - - - - let primes = [ 2; 3; 5; 7; 10; 11 ] - let computations = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - - return - if i % 2 > 0 then - printfn $"{i}" - true - else - false - } ] - - let t = - Async.Parallel(computations, maxDegreeOfParallelism=3) - |> Async.StartAsTask - - t.Wait() - printfn $"%A{t.Result}" - - This will print "3", "5" (in any order) in 1-2 seconds, and then "7", "11" (in any order) in 1-2 more seconds and then - [| false; true; true; true; false; true |]. - - - - Creates an asynchronous computation that executes all the given asynchronous computations, - initially queueing each as work items and using a fork/join pattern. - - If all child computations succeed, an array of results is passed to the success continuation. - - If any child computation raises an exception, then the overall computation will trigger an - exception, and cancel the others. - - The overall computation will respond to cancellation while executing the child computations. - If cancelled, the computation will cancel any remaining child computations but will still wait - for the other child computations to complete. - - A sequence of distinct computations to be parallelized. - - A computation that returns an array of values from the sequence of input computations. - - Composing Async Computations - - - - let primes = [ 2; 3; 5; 7; 10; 11 ] - let t = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - - if i % 2 > 0 then - printfn $"{i}" - return true - else - return false - } - ] - |> Async.Parallel - |> Async.StartAsTask - - t.Wait() - printfn $"%A{t.Result}" - - This will print "3", "5", "7", "11" (in any order) in 1-2 seconds and then [| false; true; true; true; false; true |]. - - - - Generates a scoped, cooperative cancellation handler for use within an asynchronous workflow. - - For example, - async { use! holder = Async.OnCancel interruption ... } - 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 - interruption is executed on the thread that is performing the cancellation. This can - be used to arrange for a computation to be asynchronously notified that a cancellation - has occurred, e.g. by setting a flag, or deregistering a pending I/O action. - - The function that is executed on the thread performing the - cancellation. - - An asynchronous computation that triggers the interruption if it is cancelled - before being disposed. - - Cancellation and Exceptions - - - - let primes = [ 2; 3; 5; 7; 11 ] - for i in primes do - async { - use! holder = Async.OnCancel(fun () -> printfn $"Computation Cancelled: {i}") - do! Async.Sleep(i * 1000) - printfn $"{i}" - } - |> Async.Start - - Thread.Sleep(6000) - Async.CancelDefaultToken() - printfn "Tasks Finished" - - This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation - and then print "Computation Cancelled: 7", "Computation Cancelled: 11" and "Tasks Finished" in any order. - - - - Creates an asynchronous computation that runs the given computation and ignores - its result. - - The input computation. - - A computation that is equivalent to the input computation, but disregards the result. - - Composing Async Computations - - - - let readFile filename numBytes = - async { - use file = System.IO.File.OpenRead(filename) - printfn "Reading from file %s." filename - // Throw away the data being read. - do! file.AsyncRead(numBytes) |> Async.Ignore - } - readFile "example.txt" 42 |> Async.Start - - Reads bytes from a given file asynchronously and then ignores the result, allowing the do! to be used with functions - that return an unwanted value. - - - - Creates an asynchronous computation that captures the current - success, exception and cancellation continuations. The callback must - eventually call exactly one of the given continuations. - - The function that accepts the current success, exception, and cancellation - continuations. - - An asynchronous computation that provides the callback with the current continuations. - - Composing Async Computations - - - - let someRiskyBusiness() = - match DateTime.Today with - | dt when dt.DayOfWeek = DayOfWeek.Monday -> failwith "Not compatible with Mondays" - | dt -> dt - - let computation = - (fun (successCont, exceptionCont, cancellationCont) -> - try - someRiskyBusiness () |> successCont - with - | :? OperationCanceledException as oce -> cancellationCont oce - | e -> exceptionCont e) - |> Async.FromContinuations - - Async.StartWithContinuations( - computation, - (fun result -> printfn $"Result: {result}"), - (fun e -> printfn $"Exception: {e}"), - (fun oce -> printfn $"Cancelled: {oce}") - ) - - This anonymous function will call someRiskyBusiness() and properly use the provided continuations - defined to report the outcome. - - - - Creates an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET 2.0 APIs. - - The computation will respond to cancellation while waiting for the completion - of the operation. If a cancellation occurs, and cancelAction is specified, then it is - executed, and the computation continues to wait for the completion of the operation. - - If cancelAction is not specified, then cancellation causes the computation - to stop immediately, and subsequent invocations of the callback are ignored. - - The first argument for the operation. - The second argument for the operation. - The third argument for the operation. - The function initiating a traditional CLI asynchronous operation. - The function completing a traditional CLI asynchronous operation. - An optional function to be executed when a cancellation is requested. - - An asynchronous computation wrapping the given Begin/End functions. - - Legacy .NET Async Interoperability - - - - - - Creates an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET 2.0 APIs. - - The computation will respond to cancellation while waiting for the completion - of the operation. If a cancellation occurs, and cancelAction is specified, then it is - executed, and the computation continues to wait for the completion of the operation. - - If cancelAction is not specified, then cancellation causes the computation - to stop immediately, and subsequent invocations of the callback are ignored. - - The first argument for the operation. - The second argument for the operation. - The function initiating a traditional CLI asynchronous operation. - The function completing a traditional CLI asynchronous operation. - An optional function to be executed when a cancellation is requested. - - An asynchronous computation wrapping the given Begin/End functions. - - Legacy .NET Async Interoperability - - - - - - Creates an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET 2.0 APIs. - - - The computation will respond to cancellation while waiting for the completion - of the operation. If a cancellation occurs, and cancelAction is specified, then it is - executed, and the computation continues to wait for the completion of the operation. - - If cancelAction is not specified, then cancellation causes the computation - to stop immediately, and subsequent invocations of the callback are ignored. - - - The argument for the operation. - The function initiating a traditional CLI asynchronous operation. - The function completing a traditional CLI asynchronous operation. - An optional function to be executed when a cancellation is requested. - - An asynchronous computation wrapping the given Begin/End functions. - - Legacy .NET Async Interoperability - - - - - - Creates an asynchronous computation in terms of a Begin/End pair of actions in - the style used in CLI APIs. - - - - The computation will respond to cancellation while waiting for the completion - of the operation. If a cancellation occurs, and cancelAction is specified, then it is - executed, and the computation continues to wait for the completion of the operation. - - If cancelAction is not specified, then cancellation causes the computation - to stop immediately, and subsequent invocations of the callback are ignored. - - The function initiating a traditional CLI asynchronous operation. - The function completing a traditional CLI asynchronous operation. - An optional function to be executed when a cancellation is requested. - - An asynchronous computation wrapping the given Begin/End functions. - - Legacy .NET Async Interoperability - - - - - - Creates an asynchronous computation that executes all given asynchronous computations in parallel, - returning the result of the first succeeding computation (one whose result is 'Some x'). - If all child computations complete with None, the parent computation also returns None. - - - - If any child computation raises an exception, then the overall computation will trigger an - exception, and cancel the others. - - The overall computation will respond to cancellation while executing the child computations. - If cancelled, the computation will cancel any remaining child computations but will still wait - for the other child computations to complete. - - - A sequence of computations to be parallelized. - - A computation that returns the first succeeding computation. - - Composing Async Computations - - - - printfn "Starting" - let primes = [ 2; 3; 5; 7 ] - let computations = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - return if i % 2 > 0 then Some(i) else None - } - ] - - computations - |> Async.Choice - |> Async.RunSynchronously - |> function - | Some (i) -> printfn $"{i}" - | None -> printfn "No Result" - - Prints one randomly selected odd number in 1-2 seconds. If the list is changed to all even numbers, it will - instead print "No Result". - - - - - let primes = [ 2; 3; 5; 7 ] - let computations = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - - return - if i % 2 > 0 then - Some(i) - else - failwith $"Even numbers not supported: {i}" - } - ] - - computations - |> Async.Choice - |> Async.RunSynchronously - |> function - | Some (i) -> printfn $"{i}" - | None -> printfn "No Result" - - Will sometimes print one randomly selected odd number, sometimes throw System.Exception("Even numbers not supported: 2"). - - - - Creates an asynchronous computation that executes computation. - If this computation completes successfully then return Choice1Of2 with the returned - value. If this computation raises an exception before it completes then return Choice2Of2 - with the raised exception. - - The input computation that returns the type T. - - A computation that returns a choice of type T or exception. - - Cancellation and Exceptions - - - - let someRiskyBusiness() = - match DateTime.Today with - | dt when dt.DayOfWeek = DayOfWeek.Monday -> failwith "Not compatible with Mondays" - | dt -> dt - - async { return someRiskyBusiness() } - |> Async.Catch - |> Async.RunSynchronously - |> function - | Choice1Of2 result -> printfn $"Result: {result}" - | Choice2Of2 e -> printfn $"Exception: {e}" - - Prints the returned value of someRiskyBusiness() or the exception if there is one. - - - - Raises the cancellation condition for the most recent set of asynchronous computations started - without any specific CancellationToken. Replaces the global CancellationTokenSource with a new - global token source for any asynchronous computations created after this point without any - specific CancellationToken. - - Cancellation and Exceptions - - - - let primes = [ 2; 3; 5; 7; 11 ] - - let computations = - [ for i in primes do - async { - do! Async.Sleep(i * 1000) - printfn $"{i}" - } - ] - - try - let t = - Async.Parallel(computations, 3) |> Async.StartAsTask - - Thread.Sleep(6000) - Async.CancelDefaultToken() - printfn $"Tasks Finished: %A{t.Result}" - with - | :? System.AggregateException as ae -> printfn $"Tasks Not Finished: {ae.Message}" - - This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation and - then print "Tasks Not Finished: One or more errors occurred. (A task was canceled.)". - - - - Creates an asynchronous computation that will wait on the given WaitHandle. - - The computation returns true if the handle indicated a result within the given timeout. - - The WaitHandle that can be signalled. - The timeout value in milliseconds. If one is not provided - then the default value of -1 corresponding to . - - An asynchronous computation that waits on the given WaitHandle. - - Awaiting Results - - - - - Return an asynchronous computation that will wait for the given task to complete and return - its result. - - The task to await. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - If the task is cancelled then is raised. Note - that the task may be governed by a different cancellation token to the overall async computation - where the AwaitTask occurs. In practice you should normally start the task with the - cancellation token returned by let! ct = Async.CancellationToken, and catch - any at the point where the - overall async is started. - - - Awaiting Results - - - - - Return an asynchronous computation that will wait for the given task to complete and return - its result. - - The task to await. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - If the task is cancelled then is raised. Note - that the task may be governed by a different cancellation token to the overall async computation - where the AwaitTask occurs. In practice you should normally start the task with the - cancellation token returned by let! ct = Async.CancellationToken, and catch - any at the point where the - overall async is started. - - - Awaiting Results - - - - - Creates an asynchronous computation that will wait on the IAsyncResult. - - The computation returns true if the handle indicated a result within the given timeout. - - The IAsyncResult to wait on. - The timeout value in milliseconds. If one is not provided - then the default value of -1 corresponding to . - - An asynchronous computation that waits on the given IAsyncResult. - - Awaiting Results - - - - - Creates an asynchronous computation that waits for a single invocation of a CLI - event by adding a handler to the event. Once the computation completes or is - cancelled, the handler is removed from the event. - - The computation will respond to cancellation while waiting for the event. If a - cancellation occurs, and cancelAction is specified, then it is executed, and - the computation continues to wait for the event. - - If cancelAction is not specified, then cancellation causes the computation - to cancel immediately. - - The event to handle once. - An optional function to execute instead of cancelling when a - cancellation is issued. - - An asynchronous computation that waits for the event to be invoked. - - Awaiting Results - - - - - Creates three functions that can be used to implement the .NET 1.0 Asynchronous - Programming Model (APM) for a given asynchronous computation. - - A function generating the asynchronous computation to split into the traditional - .NET Asynchronous Programming Model. - - A tuple of the begin, end, and cancel members. - - Legacy .NET Async Interoperability - - - - - Holds static members for creating and manipulating asynchronous computations. - - - See also F# Language Guide - Async Workflows. - - - Async Programming - - - - An asynchronous computation, which, when run, will eventually produce a value of type T, or else raises an exception. - - - - This type has no members. Asynchronous computations are normally specified either by using an async expression - or the static methods in the type. - - See also F# Language Guide - Async Workflows. - - - - Library functionality for asynchronous programming, events and agents. See also - Asynchronous Programming, - Events and - Lazy Expressions in the - F# Language Guide. - - - Async Programming - - - - The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. - - - - - Hosts the task code in a state machine and starts the task, executing in the threadpool using Task.Run - - - - - Contains methods to build tasks using the F# computation expression syntax - - - - - The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. - - - - - Hosts the task code in a state machine and starts the task. - - - - - Contains methods to build tasks using the F# computation expression syntax - - - - - Specifies a unit of task code which produces no result - - - - - Specifies the iterative execution of a unit of task code. - - - - - Specifies a unit of task code which excuted using try/with semantics - - - - - Specifies a unit of task code which excuted using try/finally semantics - - - - - Specifies a unit of task code which returns a value - - - - - Specifies the iterative execution of a unit of task code. - - - - - Specifies the delayed execution of a unit of task code. - - - - - Specifies the sequential composition of two units of task code. - - - - - Contains methods to build tasks using the F# computation expression syntax - - - - - A special compiler-recognised delegate type for specifying blocks of task code - with access to the state machine. - - - - - Represents the runtime continuation of a task state machine created dynamically - - - - - This is used by the compiler as a template for creating state machine structs - - - - - Holds the MethodBuilder for the state machine - - - - - Holds the final result of the state machine - - - - - The extra data stored in ResumableStateMachine for tasks - - - - Raises a timeout exception if a message not received in this amount of time. By default - no timeout is used. - - - - - Occurs when the execution of the agent results in an exception. - - - - - Occurs when the execution of the agent results in an exception. - - - - - Raises a timeout exception if a message not received in this amount of time. By default - no timeout is used. - - - - - Returns the number of unprocessed messages in the message queue of the agent. - - - - - Occurs when the execution of the agent results in an exception. - - - - - Scans for a message by looking through messages in arrival order until scanner - returns a Some value. Other messages remain in the queue. - - This method is for use within the body of the agent. For each agent, at most - one concurrent reader may be active, so no more than one concurrent call to - Receive, TryReceive, Scan and/or TryScan may be active. - - The function to return None if the message is to be skipped - or Some if the message is to be processed and removed from the queue. - An optional timeout in milliseconds. Defaults to -1 which corresponds - to . - - An asynchronous computation that scanner built off the read message. - - - - - Waits for a message. This will consume the first message in arrival order. - - This method is for use within the body of the agent. - - Returns None if a timeout is given and the timeout is exceeded. - - This method is for use within the body of the agent. For each agent, at most - one concurrent reader may be active, so no more than one concurrent call to - Receive, TryReceive, Scan and/or TryScan may be active. - An optional timeout in milliseconds. Defaults to -1 which - corresponds to . - - An asynchronous computation that returns the received message or - None if the timeout is exceeded. - - - - - Like PostAndReply, but returns None if no reply within the timeout period. - - The function to incorporate the AsyncReplyChannel into - the message to be sent. - An optional timeout parameter (in milliseconds) to wait for a reply message. - Defaults to -1 which corresponds to . - - The reply from the agent or None if the timeout expires. - - - - - Starts the agent immediately on the current operating system thread. - - - - - Creates and starts an agent immediately on the current operating system thread. The body - function is used to generate the asynchronous computation executed by the agent. - - The function to produce an asynchronous computation that will be executed - as the read loop for the MailboxProcessor when StartImmediately is called. - An optional cancellation token for the body. - Defaults to Async.DefaultCancellationToken. - - The created MailboxProcessor. - - - - - Starts the agent. - - - - - Creates and starts an agent. The body function is used to generate the asynchronous - computation executed by the agent. - - The function to produce an asynchronous computation that will be executed - as the read loop for the MailboxProcessor when Start is called. - An optional cancellation token for the body. - Defaults to Async.DefaultCancellationToken. - - The created MailboxProcessor. - - - - - Scans for a message by looking through messages in arrival order until scanner - returns a Some value. Other messages remain in the queue. - - Returns None if a timeout is given and the timeout is exceeded. - - This method is for use within the body of the agent. For each agent, at most - one concurrent reader may be active, so no more than one concurrent call to - Receive, TryReceive, Scan and/or TryScan may be active. - - The function to return None if the message is to be skipped - or Some if the message is to be processed and removed from the queue. - An optional timeout in milliseconds. Defaults to -1 which corresponds - to . - - An asynchronous computation that scanner built off the read message. - - Thrown when the timeout is exceeded. - - - - - Waits for a message. This will consume the first message in arrival order. - - This method is for use within the body of the agent. - - This method is for use within the body of the agent. For each agent, at most - one concurrent reader may be active, so no more than one concurrent call to - Receive, TryReceive, Scan and/or TryScan may be active. - An optional timeout in milliseconds. Defaults to -1 which corresponds - to . - - An asynchronous computation that returns the received message. - Thrown when the timeout is exceeded. - - - - - Like AsyncPostAndReply, but returns None if no reply within the timeout period. - - The function to incorporate the AsyncReplyChannel into - the message to be sent. - An optional timeout parameter (in milliseconds) to wait for a reply message. - Defaults to -1 which corresponds to . - - An asynchronous computation that will return the reply or None if the timeout expires. - - - - - Posts a message to an agent and await a reply on the channel, synchronously. - - The message is generated by applying buildMessage to a new reply channel - to be incorporated into the message. The receiving agent must process this - message and invoke the Reply method on this reply channel precisely once. - The function to incorporate the AsyncReplyChannel into - the message to be sent. - An optional timeout parameter (in milliseconds) to wait for a reply message. - Defaults to -1 which corresponds to . - - The reply from the agent. - - - - - Posts a message to an agent and await a reply on the channel, asynchronously. - - The message is generated by applying buildMessage to a new reply channel - to be incorporated into the message. The receiving agent must process this - message and invoke the Reply method on this reply channel precisely once. - The function to incorporate the AsyncReplyChannel into - the message to be sent. - An optional timeout parameter (in milliseconds) to wait for a reply message. - Defaults to -1 which corresponds to . - - An asynchronous computation that will wait for the reply from the agent. - - - - - Posts a message to the message queue of the MailboxProcessor, asynchronously. - - The message to post. - - - - - Disposes the agent's internal resources. - - - - - Creates an agent. The body function is used to generate the asynchronous - computation executed by the agent. This function is not executed until - Start is called. - - The function to produce an asynchronous computation that will be executed - as the read loop for the MailboxProcessor when Start is called. - An optional cancellation token for the body. - Defaults to Async.DefaultCancellationToken. - - The created MailboxProcessor. - - - - - A message-processing agent which executes an asynchronous computation. - - The agent encapsulates a message queue that supports multiple-writers and - a single reader agent. Writers send messages to the agent by using the Post - method and its variations. - - The agent may wait for messages using the Receive or TryReceive methods or - scan through all available messages using the Scan or TryScan method. - - Agents - - - Sends a reply to a PostAndReply message. - The value to send. - - - A handle to a capability to reply to a PostAndReply message. - - Agents - - - Forces the execution of this value and return its result. Same as Value. Mutual exclusion is used to - prevent other threads also computing the value. - The value of the Lazy object. - - - Creates a lazy computation that evaluates to the given value when forced. - - The input value. - - The created Lazy object. - - - Creates a lazy computation that evaluates to the result of the given function when forced. - - The function to provide the value when needed. - - The created Lazy object. - - - Extensions related to Lazy values. - - Lazy Computation - - - Returns an asynchronous computation that, when run, will wait for the download of the given URI to specified file. - - The URI to retrieve. - The file name to save download to. - - An asynchronous computation that will wait for the download of the URI to specified file. - - - - open System.Net - open System - let client = new WebClient() - Uri("https://www.w3.com") |> fun x -> client.AsyncDownloadFile(x, "output.html") |> Async.RunSynchronously - - This will download the server response as a file and output it as output.html - - - - Returns an asynchronous computation that, when run, will wait for the download of the given URI. - - The URI to retrieve. - - An asynchronous computation that will wait for the download of the URI. - - - - open System.Net - open System.Text - open System - let client = new WebClient() - client.AsyncDownloadData(Uri("https://www.w3.org")) |> Async.RunSynchronously |> Encoding.ASCII.GetString - - - Downloads the data in bytes and decodes it to a string. - - - Returns an asynchronous computation that, when run, will wait for the download of the given URI. - - The URI to retrieve. - - An asynchronous computation that will wait for the download of the URI. - - - - open System - let client = new WebClient() - Uri("https://www.w3.org") |> client.AsyncDownloadString |> Async.RunSynchronously - - This will download the server response from https://www.w3.org - - - - Returns an asynchronous computation that, when run, will wait for a response to the given WebRequest. - An asynchronous computation that waits for response to the WebRequest. - - - - open System.Net - open System.IO - let responseStreamToString = fun (responseStream : WebResponse) -> - let reader = new StreamReader(responseStream.GetResponseStream()) - reader.ReadToEnd() - let webRequest = WebRequest.Create("https://www.w3.org") - let result = webRequest.AsyncGetResponse() |> Async.RunSynchronously |> responseStreamToString - - - Gets the web response asynchronously and converts response stream to string - - - A module of extension members providing asynchronous operations for some basic Web operations. - - Async Programming - - - Connects a listener function to the observable. The listener will - be invoked for each observation. The listener can be removed by - calling Dispose on the returned IDisposable object. - - The function to be called for each observation. - - An object that will remove the listener if disposed. - - - - - Permanently connects a listener function to the observable. The listener will - be invoked for each observation. - - The function to be called for each observation. - - - - - Returns an asynchronous computation that will write the given bytes to the stream. - - The buffer to write from. - An optional offset as a number of bytes in the stream. - An optional number of bytes to write to the stream. - - An asynchronous computation that will write the given bytes to the stream. - - Thrown when the sum of offset and count is longer than - the buffer length. - Thrown when offset or count is negative. - - - - - Returns an asynchronous computation that will read the given number of bytes from the stream. - - The number of bytes to read. - - An asynchronous computation that returns the read byte[] when run. - - - - - Returns an asynchronous computation that will read from the stream into the given buffer. - The buffer to read into. - An optional offset as a number of bytes in the stream. - An optional number of bytes to read from the stream. - - An asynchronous computation that will read from the stream into the given buffer. - - Thrown when the sum of offset and count is longer than - the buffer length. - Thrown when offset or count is negative. - - - - - A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O. - - Async Programming - - - The F# compiler emits calls to this function to implement the try/with construct for F# async expressions. - - The async activation. - The computation to protect. - The exception filter. - - A value indicating asynchronous execution. - - - The F# compiler emits calls to this function to implement the try/finally construct for F# async expressions. - - The async activation. - The computation to protect. - The finally code. - - A value indicating asynchronous execution. - - - The F# compiler emits calls to this function to implement the let! construct for F# async expressions. - - The async activation. - The first part of the computation. - A function returning the second part of the computation. - - An async activation suitable for running part1 of the asynchronous execution. - - - The F# compiler emits calls to this function to implement constructs for F# async expressions. - - The async activation. - The result of the first part of the computation. - A function returning the second part of the computation. - - A value indicating asynchronous execution. - - - The F# compiler emits calls to this function to implement constructs for F# async expressions. - - The async computation. - The async activation. - - A value indicating asynchronous execution. - - - The F# compiler emits calls to this function to implement F# async expressions. - - The body of the async computation. - - The async computation. - - - Entry points for generated code - - Async Internals - - - - The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. - - - - - Specifies a unit of task code which draws a result from a task. - - - - - Specifies a unit of task code which draws a result from a task then calls a continuation. - - - - - Contains high-priority overloads for the `task` computation expression builder. - - - - - Specifies a unit of task code which draws a result from an F# async value. - - - - - Specifies a unit of task code which draws a result from an F# async value then calls a continuation. - - - - - Contains medium-priority overloads for the `task` computation expression builder. - - - - - Specifies a unit of task code which binds to the resource implementing IDisposable and disposes it synchronously - - - - - The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. - - - - - Specifies a unit of task code which draws its result from a task-like value - satisfying the GetAwaiter pattern. - - - - - Specifies a unit of task code which draws a result from a task-like value - satisfying the GetAwaiter pattern and calls a continuation. - - - - - Contains low-priority overloads for the `task` computation expression builder. - - - - - Builds a task using computation expression syntax which switches to execute on a background thread if not - already doing so. - - - - If the task is created on a foreground thread (where is non-null) - its body is executed on a background thread using . - If created on a background thread (where is null) it is executed - immediately on that thread. - - - - - - - Builds a task using computation expression syntax. - - - - - - - Contains the `task` computation expression builder. - - - - Returns 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. - - The input event. - - An event that triggers on pairs of consecutive values passed from the source event. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let pairWise = Event.pairwise timer - - let extractPair (pair: Timers.ElapsedEventArgs * Timers.ElapsedEventArgs) = - let leftPair, rightPair = pair - printfn $"(Left): {leftPair.SignalTime} (Right): {rightPair.SignalTime}" - - pairWise.Subscribe(extractPair) |> ignore - - Console.ReadLine() |> ignore - - The sample will output the timer event every second: - (Left): 2/14/2022 11:58:46 PM (Right): 2/14/2022 11:58:46 PM - (Left): 2/14/2022 11:58:46 PM (Right): 2/14/2022 11:58:47 PM - (Left): 2/14/2022 11:58:47 PM (Right): 2/14/2022 11:58:48 PM - - - - Runs the given function each time the given event is triggered. - - The function to call when the event is triggered. - The input event. - - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - Event.add (fun (event: Timers.ElapsedEventArgs) -> printfn $"{event.SignalTime} ") timer - - Console.ReadLine() |> ignore - - The sample will output the timer event every second: - 2/14/2022 11:52:05 PM - 2/14/2022 11:52:06 PM - 2/14/2022 11:52:07 PM - 2/14/2022 11:52:08 PM - - - - Returns 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. - - The function to update the state with each event value. - The initial state. - The input event. - - An event that fires on the updated state values. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let multiplyBy number = - fun (timerEvent: Timers.ElapsedEventArgs) -> number * timerEvent.SignalTime./// Second - - let initialState = 2 - - let scan = Event.scan multiplyBy initialState timer - - scan.Subscribe(fun x -> printf "%A " x) |> ignore - - Console.ReadLine() |> ignore - - The sample will output depending on your timestamp. It will multiply the seconds with an initial state of 2: 106 5724 314820 17629920 1004905440 -1845026624 -1482388416 - - - - Returns 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. - - The function to select and transform event values to pass on. - The input event. - - An event that fires only when the chooser returns Some. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let getEvenSeconds (number: Timers.ElapsedEventArgs) = - match number with - | _ when number.SignalTime.Second % 2 = 0 -> Some number.SignalTime - | _ -> None - - let evenSecondsEvent = Event.choose getEvenSeconds timer - - evenSecondsEvent.Subscribe(fun x -> printfn $"{x} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will output: 2/15/2022 12:04:04 AM - 2/15/2022 12:04:06 AM - 2/15/2022 12:04:08 AM - - - - Returns 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. - - The function to transform event values into one of two types. - The input event. - - A tuple of events. The first fires whenever splitter evaluates to Choice1of1 and - the second fires whenever splitter evaluates to Choice2of2. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let bySeconds (timerEvent: Timers.ElapsedEventArgs) = - match timerEvent.SignalTime.Second % 2 = 0 with - | true -> Choice1Of2 timerEvent.SignalTime.Second - | false -> Choice2Of2 $"{timerEvent.SignalTime.Second} is not an even num ber" - - let evenSplit, printOddNumbers = Event.split bySeconds timer - - let printOutput event functionName = - Event.add (fun output -> printfn $"{functionName} - Split output: {output}. /// Type: {output.GetType()}") event - - printOutput evenSplit (nameof evenSplit) |> ignore - - printOutput printOddNumbers (nameof printOddNumbers) - |> ignore - - Console.ReadLine() |> ignore - - The sample will split the events by even or odd seconds: evenSplit - Split output: 44. Type: System.Int32 - printOddNumbers - Split output: 45 is not an even number. Type: System.String - evenSplit - Split output: 46. Type: System.Int32 - printOddNumbers - Split output: 47 is not an even number. Type: System.String - evenSplit - Split output: 48. Type: System.Int32 - printOddNumbers - Split output: 49 is not an even number. Type: System.String - - - - Returns 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. - - The function to determine which output event to trigger. - The input event. - - A tuple of events. The first is triggered when the predicate evaluates to true - and the second when the predicate evaluates to false. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let getEvenSeconds (number: Timers.ElapsedEventArgs) = - match number with - | _ when number.SignalTime.Second % 2 = 0 -> true - | _ -> false - - let leftPartition, rightPartition = Event.partition getEvenSeconds timer - - leftPartition.Subscribe(fun x -> printfn $"Left partition: {x.SignalTime}") - |> ignore - - rightPartition.Subscribe(fun x -> printfn $"Right partition: {x.SignalTime}") - |> ignore - - Console.ReadLine() |> ignore - - The sample will partition into two events if it is even or odd seconds: - Right partition: 2/15/2022 12:00:27 AM - Left partition: 2/15/2022 12:00:28 AM - Right partition: 2/15/2022 12:00:29 AM - Left partition: 2/15/2022 12:00:30 AM - Right partition: 2/15/2022 12:00:31 AM - - - - Returns 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. - - The function to determine which triggers from the event to propagate. - The input event. - - An event that only passes values that pass the predicate. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let getEvenSeconds (number: Timers.ElapsedEventArgs) = - match number with - | _ when number.SignalTime.Second % 2 = 0 -> true - | _ -> false - - let evenSecondsEvent = Event.filter getEvenSeconds timer - - evenSecondsEvent.Subscribe(fun x -> printfn $"{x} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will only output even seconds: 2/15/2022 12:03:08 AM - 2/15/2022 12:03:10 AM - 2/15/2022 12:03:12 AM - 2/15/2022 12:03:14 AM - - - - Returns a new event that passes values transformed by the given function. - - The function to transform event values. - The input event. - - An event that passes the transformed values. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let transformSeconds (number: Timers.ElapsedEventArgs) = - match number with - | _ when number.SignalTime.Second % 2 = 0 -> 100 - | _ -> -500 - - let evenSecondsEvent = Event.map transformSeconds timer - - evenSecondsEvent.Subscribe(fun x -> printf $"{x} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will transform the seconds if it's even or odd number and the output is: -500 100 -500 100 -500 100 - - - - Fires the output event when either of the input events fire. - The first input event. - The second input event. - - An event that fires when either of the input events fire. - - - open System.Reactive.Linq - open System - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let oneSecondTimer = createTimer 1000 - let fiveSecondsTimer = createTimer 5000 - - let result = Event.merge oneSecondTimer fiveSecondsTimer - - result.Subscribe(fun output -> printfn $"Output - {output.SignalTime} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will output: Output - 2/15/2022 12:10:40 AM - Output - 2/15/2022 12:10:41 AM - Output - 2/15/2022 12:10:41 AM - Output - 2/15/2022 12:10:42 AM - Output - 2/15/2022 12:10:43 AM - - - - Contains operations for working with values of type . - - Events and Observables - - - Returns a new observable that triggers on the second and subsequent triggerings of the input observable. - The Nth triggering of the input observable 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. - - For each observer, the registered intermediate observing object is not thread safe. - That is, observations arising from the source must not be triggered concurrently - on different threads. - The input Observable. - - An Observable that triggers on successive pairs of observations from the input Observable. - - - - /// open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let pairWise = Observable.pairwise observableNumbers - - pairWise.Subscribe(fun pair -> printf $"{pair} ") - |> ignore - - The sample evaluates to: (1, 2), (2, 3), (3, 4), (4, 5) - - - - Creates an observer which subscribes to the given observable and which calls - the given function for each observation. - - The function to be called on each observation. - The input Observable. - - An object that will remove the callback if disposed. - - - - open System.Reactive.Linq - let numbers = seq { 1..3 } - let observableNumbers = Observable.ToObservable numbers - let printOutput observable = - use subscription = Observable.subscribe (fun x -> printfn "%A" x) observable - subscription - printOutput observableNumbers |> ignore - - The sample evaluates to: 1, 2, 3 - - - - Creates an observer which permanently subscribes to the given observable and which calls - the given function for each observation. - - The function to be called on each observation. - The input Observable. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - let multiplyByTwo = fun number -> printf $"{number * 2} " - Observable.add multiplyByTwo observableNumbers - - The sample evaluates to: 2 4 6 8 10 - - - - Returns an observable which, for each observer, allocates an item of state - and applies the given accumulating function to successive values arising from - the input. The returned object will trigger observations for each computed - state value, excluding the initial value. The returned object propagates - all errors arising from the source and completes when the source completes. - - For each observer, the registered intermediate observing object is not thread safe. - That is, observations arising from the source must not be triggered concurrently - on different threads. - The function to update the state with each observation. - The initial state. - The input Observable. - - An Observable that triggers on the updated state values. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let multiplyBy number = fun y -> number * y - let initialState = 2 - let scan = Observable.scan multiplyBy initialState observableNumbers - - scan.Subscribe(fun x -> printf "%A " x) |> ignore - - The sample evaluates to: 2 4 12 48 240 - - - - Returns an observable which chooses a projection of observations from the source - using the given function. The returned object will trigger observations x - for which the splitter returns Some x. The returned object also propagates - all errors arising from the source and completes when the source completes. - - The function that returns Some for observations to be propagated - and None for observations to ignore. - The input Observable. - - An Observable that only propagates some of the observations from the source. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let getOddNumbers number = - match number with - | _ when number % 2 = 0 -> None - | _ -> Some number - - let map = Observable.choose getOddNumbers observableNumbers - - map.Subscribe(fun x -> printf $"{x} ") |> ignore - - The sample will output: 1 3 5 - - - - Returns two observables which split the observations of the source by the - given function. The first will trigger observations x for which the - splitter returns Choice1Of2 x. The second will trigger observations - y for which the splitter returns Choice2Of2 y The splitter is - executed once for each subscribed observer. Both also propagate error - observations arising from the source and each completes when the source - completes. - - The function that takes an observation an transforms - it into one of the two output Choice types. - The input Observable. - - A tuple of Observables. The first triggers when splitter returns Choice1of2 - and the second triggers when splitter returns Choice2of2. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let getEvenNumbers number = - match number % 2 = 0 with - | true -> Choice1Of2 number - | false -> Choice2Of2 $"{number} is not an even number" - - let evenSplit, printOddNumbers = Observable.split getEvenNumbers observableNumbers - - let printOutput observable functionName = - use subscription = - Observable.subscribe - (fun output -> printfn $"{functionName} - Split output: {output}. Type: {output.GetType()}") - observable - - subscription - - printOutput evenSplit (nameof evenSplit) |> ignore - printOutput printOddNumbers (nameof printOddNumbers) |> ignore - - The sample evaluates to: evenSplit - Split output: 2. Type: System.Int32 - evenSplit - Split output: 4. Type: System.Int32 - printOddNumbers - Split output: 1 is not an even number. Type: System.String - printOddNumbers - Split output: 3 is not an even number. Type: System.String - printOddNumbers - Split output: 5 is not an even number. Type: System.String - - - - Returns two observables which partition the observations of the source by - the given function. The first will trigger observations for those values - for which the predicate returns true. The second will trigger observations - for those values where the predicate returns false. The predicate is - executed once for each subscribed observer. Both also propagate all error - observations arising from the source and each completes when the source - completes. - - The function to determine which output Observable will trigger - a particular observation. - The input Observable. - - A tuple of Observables. The first triggers when the predicate returns true, and - the second triggers when the predicate returns false. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let isEvenNumber = fun number -> number % 2 = 0 - - let leftPartition, rightPartition = - Observable.partition isEvenNumber observableNumbers - - leftPartition.Subscribe(fun x -> printfn $"Left partition: {x}") |> ignore - - rightPartition.Subscribe(fun x -> printfn $"Right partition: {x}") |> ignore - - The sample evaluates to: Left partition: 2, 4, Right partition: 1, 3, 5 - - - - Returns an observable which filters the observations of the source - by the given function. The observable will see only those observations - for which the predicate returns true. The predicate is executed once for - each subscribed observer. The returned object also propagates error - observations arising from the source and completes when the source completes. - - The function to apply to observations to determine if it should - be kept. - The input Observable. - - An Observable that filters observations based on filter. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let getEvenNumbers = fun number -> number % 2 = 0 - let map = Observable.filter multiplyByTwo observableNumbers - - map.Subscribe(fun x -> printf $"{x} ") |> ignore - - The sample will output: 2 4 - - - - Returns an observable which transforms the observations of the source by the - given function. The transformation function is executed once for each - subscribed observer. The returned object also propagates error observations - arising from the source and completes when the source completes. - The function applied to observations from the source. - The input Observable. - - An Observable of the type specified by mapping. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let multiplyByTwo = fun number -> number * 2 - let map = Observable.map multiplyByTwo observableNumbers - - map.Subscribe(fun x -> printf $"{x} ") |> ignore - - The sample will output: 2 4 6 8 10 - - - - Returns an observable for the merged observations from the sources. - The returned object propagates success and error values arising - from either source and completes when both the sources have completed. - - For each observer, the registered intermediate observing object is not - thread safe. That is, observations arising from the sources must not - be triggered concurrently on different threads. - - The first Observable. - The second Observable. - - An Observable that propagates information from both sources. - - - - open System.Reactive.Linq - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - Observable.Create(fun observer -> timer.Elapsed.Subscribe(observer)) - - let observableFirstTimer = createTimer 1000 - let observableSecondTimer = createTimer 3000 - - let result = Observable.merge observableFirstTimer observableSecondTimer - - result.Subscribe(fun output -> printfn $"Output - {output.SignalTime} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will merge all events at a given interval and output it to the stream: - Output - 2/5/2022 3:49:37 AM - Output - 2/5/2022 3:49:38 AM - Output - 2/5/2022 3:49:39 AM - Output - 2/5/2022 3:49:39 AM - Output - 2/5/2022 3:49:40 AM - Output - 2/5/2022 3:49:41 AM - Output - 2/5/2022 3:49:42 AM - Output - 2/5/2022 3:49:42 AM - - - - - Contains operations for working with first class event and other observable objects. - - Events and Observables - - - - A method used to support the F# query syntax. Returns an empty sequence that has the specified type argument. - - - - - - - A method used to support the F# query syntax. Returns a sequence that contains the specified values. - - - - - - - A method used to support the F# query syntax. Returns a sequence of length one that contains the specified value. - - - - - - A query operator that selects those elements based on a specified predicate. - - - - - - A query operator that performs a subsequent ordering of the elements selected so far in descending order by the given nullable sorting key. - This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. - - - - - - A query operator that performs a subsequent ordering of the elements selected so far in ascending order by the given nullable sorting key. - This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. - - - - - - A query operator that performs a subsequent ordering of the elements selected so far in descending order by the given sorting key. - This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. - - - - - - A query operator that performs a subsequent ordering of the elements selected so far in ascending order by the given sorting key. - This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. - - - - - - A query operator that selects elements from a sequence as long as a specified condition is true, and then skips the remaining elements. - - - - - - A query operator that selects a specified number of contiguous elements from those selected so far. - - - - - - A query operator that selects a nullable value for each element selected so far and returns the sum of these values. - If any nullable does not have a value, it is ignored. - - - - - - A query operator that selects a value for each element selected so far and returns the sum of these values. - - - - - - - A method used to support the F# query syntax. Inputs to queries are implicitly wrapped by a call to one of the overloads of this method. - - - - - - - A method used to support the F# query syntax. Inputs to queries are implicitly wrapped by a call to one of the overloads of this method. - - - - - - A query operator that sorts the elements selected so far in descending order by the given nullable sorting key. - - - - - - A query operator that sorts the elements selected so far in ascending order by the given nullable sorting key. - - - - - - A query operator that sorts the elements selected so far in descending order by the given sorting key. - - - - - - A query operator that sorts the elements selected so far in ascending order by the given sorting key. - - - - - - A query operator that bypasses elements in a sequence as long as a specified condition is true and then selects the remaining elements. - - - - - - A query operator that bypasses a specified number of the elements selected so far and selects the remaining elements. - - - - - - A query operator that projects each of the elements selected so far. - - - - - - - A method used to support the F# query syntax. Runs the given quotation as a query using LINQ IQueryable rules. - - - - - - - A method used to support the F# query syntax. Indicates that the query should be passed as a quotation to the Run method. - - - - - - A query operator that selects the element at a specified index amongst those selected so far. - - - - - - A query operator that selects a nullable value for each element selected so far and returns the minimum of these values. - If any nullable does not have a value, it is ignored. - - - - - - A query operator that selects a value for each element selected so far and returns the minimum resulting value. - - - - - - A query operator that selects a nullable value for each element selected so far and returns the maximum of these values. - If any nullable does not have a value, it is ignored. - - - - - - A query operator that selects a value for each element selected so far and returns the maximum resulting value. - - - - - - A query operator that correlates two sets of selected values based on matching keys and groups the results. - If any group is empty, a group with a single default value is used instead. - Normal usage is 'leftOuterJoin y in elements2 on (key1 = key2) into group'. - - - - - - A query operator that selects the last element of those selected so far, or a default value if no element is found. - - - - - - A query operator that selects the last element of those selected so far. - - - - - - A query operator that correlates two sets of selected values based on matching keys. - Normal usage is 'join y in elements2 on (key1 = key2)'. - - - - - - A query operator that selects the first element of those selected so far, or a default value if the sequence contains no elements. - - - - - - A query operator that selects the first element from those selected so far. - - - - - - A query operator that selects a value for each element selected so far and groups the elements by the given key. - - - - - - A query operator that correlates two sets of selected values based on matching keys and groups the results. - Normal usage is 'groupJoin y in elements2 on (key1 = key2) into group'. - - - - - - A query operator that groups the elements selected so far according to a specified key selector. - - - - - - - A method used to support the F# query syntax. Projects each element of a sequence to another sequence and combines the resulting sequences into one sequence. - - - - - - A query operator that selects the first element selected so far that satisfies a specified condition. - - - - - - A query operator that determines whether any element selected so far satisfies a condition. - - - - - - A query operator that selects the single, specific element of those selected so far, or a default value if that element is not found. - - - - - - A query operator that selects the single, specific element selected so far - - - - - - A query operator that selects distinct elements from the elements selected so far. - - - - - - A query operator that returns the number of selected elements. - - - - - - A query operator that determines whether the selected elements contains a specified element. - - - - - - A query operator that selects a nullable value for each element selected so far and returns the average of these values. - If any nullable does not have a value, it is ignored. - - - - - - A query operator that selects a value for each element selected so far and returns the average of these values. - - - - - - A query operator that determines whether all elements selected so far satisfies a condition. - - - - - - Create an instance of this builder. Use 'query { ... }' to use the query syntax. - - - - The type used to support the F# query syntax. Use 'query { ... }' to use the query syntax. See - also <a href="https://learn.microsoft.com/dotnet/fsharp/language-reference/query-expressions">F# Query Expressions</a> in the F# Language Guide. - - - - - A property used to support the F# query syntax. - - - - - A method used to support the F# query syntax. - - - - - A partial input or result in an F# query. This type is used to support the F# query syntax. - - - - Library functionality for F# query syntax and interoperability with .NET LINQ Expressions. See - also F# Query Expressions in the F# Language Guide. - - - - Converts the argument to character. Numeric inputs are converted according to the UTF-16 - encoding for characters. The operation requires an appropriate static conversion method on the input type. - - The input value. - - The converted char. - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.char (Nullable<int>()) // evaluates to Nullable<char>() - Nullable.char (Nullable<int>(64)) // evaluates to Nullable<char>('@') - - - - - Converts the argument to System.Decimal using a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted decimal. - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.decimal (Nullable<int>()) // evaluates to Nullable<decimal>() - Nullable.decimal (Nullable<int>(3)) // evaluates to Nullable<decimal>(3.0M) - - - - - Converts the argument to unsigned native integer using a direct conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted unativeint - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.unativeint (Nullable<int>()) // evaluates to Nullable<unativeint>() - Nullable.unativeint (Nullable<int>(3)) // evaluates to Nullable<unativeint>(3un) - - - - - Converts the argument to signed native integer. This is a direct conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted nativeint - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.nativeint (Nullable<int>()) // evaluates to Nullable<nativeint>() - Nullable.nativeint (Nullable<int>(3)) // evaluates to Nullable<nativeint>(3n) - - - - - Converts the argument to 64-bit float. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted float - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.double (Nullable<int>()) // evaluates to Nullable<double>() - Nullable.double (Nullable<int>(3)) // evaluates to Nullable<double>(3.0) - - - - - Converts the argument to 32-bit float. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted float32 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.single (Nullable<int>()) // evaluates to Nullable<float32>() - Nullable.single (Nullable<int>(3)) // evaluates to Nullable<float32>(3.0f) - - - - - Converts the argument to 64-bit float. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted float - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.float (Nullable<int>()) // evaluates to Nullable<float>() - Nullable.float (Nullable<int>(3)) // evaluates to Nullable<float>(3.0) - - - - - Converts the argument to 32-bit float. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted float32 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.float32 (Nullable<int>()) // evaluates to Nullable<float32>() - Nullable.float32 (Nullable<int>(3)) // evaluates to Nullable<float32>(3.0f) - - - - - Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint64 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint64 (Nullable<int>()) // evaluates to Nullable<uint64>() - Nullable.uint64 (Nullable<int>(3)) // evaluates to Nullable<uint64>(3UL) - - - - - Converts the argument to signed 64-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int64 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int64 (Nullable<int>()) // evaluates to Nullable<int64>() - Nullable.int64 (Nullable<int>(3)) // evaluates to Nullable<int64>(3L) - - - - - Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint32 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint32 (Nullable<int>()) // evaluates to Nullable<uint32>() - Nullable.uint32 (Nullable<int>(3)) // evaluates to Nullable(3u) - - - - - Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int32 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int32 (Nullable<int64>()) // evaluates to Nullable<int32>() - Nullable.int32 (Nullable<int64>(3)) // evaluates to Nullable(3) - - - - - Converts the argument to a particular enum type. - - The input value. - - The converted enum type. - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.enum<DayOfWeek> (Nullable<int>()) // evaluates to Nullable<uint>() - Nullable.enum<DayOfWeek> (Nullable<int>(3)) // evaluates to Nullable<DayOfWeek>(Wednesday) - - - - - Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted unsigned integer - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint (Nullable<int>()) // evaluates to Nullable<uint>() - Nullable.uint (Nullable<int>(3)) // evaluates to Nullable(3u) - - - - - Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int (Nullable<int64>()) // evaluates to Nullable<int>() - Nullable.int (Nullable<int64>(3)) // evaluates to Nullable(3) - - - - - Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint16 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint16 (Nullable<int>()) // evaluates to Nullable<uint16>() - Nullable.uint16 (Nullable<int>(3)) // evaluates to Nullable(3us) - - - - - Converts the argument to signed 16-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int16 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int16 (Nullable<int>()) // evaluates to Nullable<int16>() - Nullable.int16 (Nullable<int>(3)) // evaluates to Nullable(3s) - - - - - Converts the argument to signed byte. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted sbyte - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int8 (Nullable<int>()) // evaluates to Nullable<sbyte>() - Nullable.int8 (Nullable<int>(3)) // evaluates to Nullable(3y) - - - - - Converts the argument to signed byte. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted sbyte - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.sbyte (Nullable<int>()) // evaluates to Nullable<sbyte>() - Nullable.sbyte (Nullable<int>(3)) // evaluates to Nullable(3y) - - - - - Converts the argument to byte. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted byte - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint8 (Nullable<int>()) // evaluates to Nullable<byte>() - Nullable.uint8 (Nullable<int>(3)) // evaluates to Nullable(3uy) - - - - - Converts the argument to byte. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted byte - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.byte (Nullable<int>()) // evaluates to Nullable<byte>() - Nullable.byte (Nullable<int>(3)) // evaluates to Nullable(3uy) - - - - - - - Functions for converting nullable values - - - - The division operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The division operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The division operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The modulus operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The modulus operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The modulus operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The multiplication operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The multiplication operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The multiplication operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The subtraction operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The subtraction operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The subtraction operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The addition operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The addition operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The addition operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<>' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '=' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<=' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '>' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '>=' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<>' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '=' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<=' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '>' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '>=' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<>' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?<>= 4 // true - Nullable(4) ?<>= 4 // false - Nullable() ?<> 4 // true - - - - - - The '=' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?= 4 // false - Nullable(4) ?= 4 // true - Nullable() ?= 4 // false - - - - - - The '<' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?< 4 // true - Nullable(4) ?< 4 // false - Nullable() ?< 4 // false - - - - - The '<=' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?<= 4 // true - Nullable(5) ?<= 4 // false - Nullable() ?<= 4 // false - - - - - The '>' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?> 4 // false - Nullable(5) ?> 4 // true - Nullable() ?> 4 // false - - - - - - The '>=' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?>= 4 // false - Nullable(4) ?>= 4 // true - Nullable() ?>= 4 // false - - - - - - - Operators for working with nullable values, primarily used on F# queries. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - - A type used to reconstruct a grouping after applying a mutable->immutable mapping transformation - on a result of a query. - - - - - A runtime helper used to evaluate nested quotation literals. - - - - - - - A runtime helper used to evaluate nested quotation literals. - - - - - - - Evaluates a subset of F# quotations by first converting to a LINQ expression, for the subset of LINQ expressions represented by the - expression syntax in the C# language. - - - - - - - Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the - expression syntax in the C# language. - - - - - - - Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the - expression syntax in the C# language. - - - - - - - When used in a quotation, this function indicates a specific conversion - should be performed when converting the quotation to a LINQ expression. - - This function should not be called directly. - - - - - When used in a quotation, this function indicates a specific conversion - should be performed when converting the quotation to a LINQ expression. - - This function should not be called directly. - - - - - When used in a quotation, this function indicates a specific conversion - should be performed when converting the quotation to a LINQ expression. - - This function should not be called directly. - - - - - Contains functionality to convert F# quotations to LINQ expression trees. - - - - Library functionality associated with converting F# quotations to .NET LINQ expression trees. - - - - - The generic MethodInfo for Select function - Describes how we got from productions of immutable objects to productions of anonymous objects, with enough information - that we can invert the process in final query results. - - - - - Given the expression part of a "yield" or "select" which produces a result in terms of immutable tuples or immutable records, - generate an equivalent expression yielding anonymous objects. Also return the conversion for the immutable-to-mutable correspondence - so we can reverse this later. - - - - - Simplify gets of tuples and gets of record fields. - - - - - Cleanup the use of property-set object constructions in leaf expressions that form parts of F# queries. - - - - - Given an type involving immutable tuples and records, logically corresponding to the type produced at a - "yield" or "select", convert it to a type involving anonymous objects according to the conversion data. - - - - - Recognize anonymous type construction written using 'new AnonymousObject(<e1>, <e2>, ...)' - - - - - Recognize object construction written using 'new O(Prop1 = <e>, Prop2 = <e>, ...)' - - - - - Tests whether a list consists only of assignments of properties of the - given variable, null values (ignored) and ends by returning the given variable - (pattern returns only property assignments) - - - - - Recognize sequential series written as (... ((<e>; <e>); <e>); ...) - - - - - A method used to support the F# query syntax. Runs the given quotation as a query using LINQ IEnumerable rules. - - - - - A module used to support the F# query syntax. - - - - - A method used to support the F# query syntax. Runs the given quotation as a query using LINQ rules. - - - - - A module used to support the F# query syntax. - - - - Contains modules used to support the F# query syntax. - - - - - A synonym for henry, the SI unit of inductance - - - - - A synonym for katal, the SI unit of catalytic activity - - - - - A synonym for sievert, the SI unit of does equivalent - - - - - A synonym for gray, the SI unit of absorbed dose - - - - - A synonym for becquerel, the SI unit of activity referred to a radionuclide - - - - - A synonym for lux, the SI unit of illuminance - - - - - A synonym for lumen, the SI unit of luminous flux - - - - - A synonym for tesla, the SI unit of magnetic flux density - - - - - A synonym for weber, the SI unit of magnetic flux - - - - - A synonym for UnitNames.ohm, the SI unit of electric resistance. - - - - - A synonym for siemens, the SI unit of electric conductance - - - - - A synonym for farad, the SI unit of capacitance - - - - - A synonym for volt, the SI unit of electric potential difference, electromotive force - - - - - A synonym for coulomb, the SI unit of electric charge, amount of electricity - - - - - A synonym for watt, the SI unit of power, radiant flux - - - - - A synonym for joule, the SI unit of energy, work, amount of heat - - - - - A synonym for pascal, the SI unit of pressure, stress - - - - - A synonym for newton, the SI unit of force - - - - - A synonym for hertz, the SI unit of frequency - - - - - A synonym for candela, the SI unit of luminous intensity - - - - - A synonym for mole, the SI unit of amount of substance - - - - - A synonym for kelvin, the SI unit of thermodynamic temperature - - - - - A synonym for ampere, the SI unit of electric current - - - - - A synonym for second, the SI unit of time - - - - - A synonym for kilogram, the SI unit of mass - - - - - A synonym for Metre, the SI unit of length - - - - - The SI unit of catalytic activity - - - - - The SI unit of does equivalent - - - - - The SI unit of absorbed dose - - - - - The SI unit of activity referred to a radionuclide - - - - - The SI unit of illuminance - - - - - The SI unit of luminous flux - - - - - The SI unit of inductance - - - - - The SI unit of magnetic flux density - - - - - The SI unit of magnetic flux - - - - - The SI unit of electric conductance - - - - - The SI unit of electric resistance - - - - - The SI unit of capacitance - - - - - The SI unit of electric potential difference, electromotive force - - - - - The SI unit of electric charge, amount of electricity - - - - - The SI unit of power, radiant flux - - - - - The SI unit of energy, work, amount of heat - - - - - The SI unit of pressure, stress - - - - - The SI unit of force - - - - - The SI unit of frequency - - - - - The SI unit of luminous intensity - - - - - The SI unit of amount of substance - - - - - The SI unit of thermodynamic temperature - - - - - The SI unit of electric current - - - - - The SI unit of time - - - - - The SI unit of mass - - - - - The SI unit of length - - - - - The SI unit of length - - - - Represents an Common IL (Intermediate Language) Signature Pointer. - - This type should only be used when writing F# code that interoperates - with other .NET languages that use generic Common IL Signature Pointers. - Use of this type in F# code may result in unverifiable code being generated. - Because of the rules of Common IL Signature Pointers, you cannot use this type in generic type parameters, - resulting in compiler errors. As a result, you should convert this type to - for use in F#. Note that Common IL Signature Pointers exposed by other .NET languages are converted to - or automatically by F#, - and F# also shows generic-specialized typed native pointers correctly to other .NET languages as Common IL Signature Pointers. - However, generic typed native pointers are shown as to other .NET languages. - For other languages to interpret generic F# typed native pointers correctly, you should expose this type or - instead of . - Values of this type can be generated by the functions in the NativeInterop.NativePtr module. - - ByRef and Pointer Types - - - Represents an untyped 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 - type may be required. Values of this type can be generated - by the functions in the NativeInterop.NativePtr module. - - ByRef and Pointer Types - - - 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 - type may be required. Values of this type can be generated - by the functions in the NativeInterop.NativePtr module. - - ByRef and Pointer Types - - - Single dimensional, zero-based arrays, written int[], string[] etc. - - Use the values in the module to manipulate values - of this type, or the notation arr.[x] to get/set array - values. - - Basic Types - - - Thirty-two dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Thirty-one dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Thirty dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-nine dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-eight dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-seven dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-six dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-five dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-four dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-three dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-two dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-one dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Nineteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Eighteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Seventeen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Sixteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Fifteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Fourteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Thirteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twelve dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Eleven dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Ten dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Nine dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Eight dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Seven dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Six dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Five dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - 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. - - Basic Types - - - - 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. - - Basic Types - - - - 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. - - Basic Types - - - - 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. - - Basic Types - - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . Identical to . - - Basic Types - - - An abbreviation for the CLI type . Identical to . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - - Represents an Error or a Failure. The code failed with a value of 'TError representing what went wrong. - - - - - Represents an OK or a Successful result. The code succeeded with a value of 'T. - - - - Helper type for error handling without exceptions. - - Choices and Results - - - The type of optional values, represented as structs. - - Use the constructors ValueSome and ValueNone to create values of this type. - Use the values in the ValueOption module to manipulate values of this type, - or pattern match against the values directly. - - Options - - - The representation of "Value of type 'T" - - The input value. - - An option representing the value. - - - The representation of "No value" - - - Implicitly converts a value into an optional that is a 'ValueSome' value. - - The input value - - The F# compiler ignored this method when determining possible type-directed conversions. Instead, use Some or None explicitly. - - A voption representing the value. - - - - Get the value of a 'ValueSome' option. An InvalidOperationException is raised if the option is 'ValueNone'. - - - Create a value option value that is a 'ValueNone' value. - - - - Return 'true' if the value option is a 'ValueSome' value. - - - Return 'true' if the value option is a 'ValueNone' value. - - - Create a value option value that is a 'Some' value. - - The input value - - A value option representing the value. - - - - The type of optional values, represented as structs. - - Use the constructors ValueSome and ValueNone to create values of this type. - Use the values in the ValueOption module to manipulate values of this type, - or pattern match against the values directly. - - Options - - - - The type of optional values. When used from other CLI 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 CLI languages. - Instance methods on this type will appear as static methods to other CLI languages - due to the use of null as a value representation. - - Options - - - The representation of "Value of type 'T" - - The input value. - - An option representing the value. - - - The representation of "No value" - - - Implicitly converts a value into an optional that is a 'Some' value. - - The input value - - The F# compiler ignored this method when determining possible type-directed conversions. Instead, use Some or None explicitly. - - An option representing the value. - - - - 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 input value - - An option representing the value. - - - - The type of optional values. When used from other CLI 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 CLI languages. - Instance methods on this type will appear as static methods to other CLI languages - due to the use of null as a value representation. - - Options - - - - The type of mutable references. Use the functions [!] and [:=] to get and - set values of this type. - Basic Types - - - - The current value of the reference cell - - - - 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. - - Basic Types - - - - Convert the given Converter delegate object to an F# function value - - The input Converter delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - A utility function to convert function values from tupled to curried form - - The input tupled function. - - The output curried function. - - - A utility function to convert function values from tupled to curried form - - The input tupled function. - - The output curried function. - - - A utility function to convert function values from tupled to curried form - - The input tupled function. - - The output curried function. - - - A utility function to convert function values from tupled to curried form - - The input tupled function. - - The output curried function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F#funcfunction. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F#funcfunction. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Helper functions for converting F# first class function values to and from CLI representations - of functions using delegates. - Language Primitives - - - Convert an value of type to a F# first class function value - - The input System.Converter. - - An F# function of the same type. - - - Convert an F# first class function value to a value of type - - The input function. - - A System.Converter of the function type. - - - Convert an F# first class function value to a value of type - - The input function. - - System.Converter<'T,'U> - - - 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. - - The input function. - The first arg. - The second arg. - - The function result. - - - 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. - - The input function. - The first arg. - The second arg. - The third arg. - - The function result. - - - 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. - - The input function. - The first arg. - The second arg. - The third arg. - The fourth arg. - - The function 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. - - The input function. - The first arg. - The second arg. - The third arg. - The fourth arg. - The fifth arg. - - The function result. - - - Invoke an F# first class function value with one argument - - - - 'U - - - Convert an value of type to a F# first class function value - - The input System.Converter. - - An F# function of the same type. - - - Construct an instance of an F# first class function value - The created F# function. - - - The CLI type used to represent F# function values. This type is not - typically used directly, though may be used from other CLI languages. - Language Primitives - - - Specialize the type function at a given type - The specialized type. - - - Construct an instance of an F# first class type function value - FSharpTypeFunc - - - The CLI type used to represent F# first-class type function values. This type is for use - by compiled F# code. - Language Primitives - - - Choice 7 of 7 choices - - - Choice 6 of 7 choices - - - Choice 5 of 7 choices - - - Choice 4 of 7 choices - - - Choice 3 of 7 choices - - - Choice 2 of 7 choices - - - Choice 1 of 7 choices - - - Helper types for active patterns with 7 choices. - Choices and Results - - - Choice 6 of 6 choices - - - Choice 5 of 6 choices - - - Choice 4 of 6 choices - - - Choice 3 of 6 choices - - - Choice 2 of 6 choices - - - Choice 1 of 6 choices - - - Helper types for active patterns with 6 choices. - Choices and Results - - - Choice 5 of 5 choices - - - Choice 4 of 5 choices - - - Choice 3 of 5 choices - - - Choice 2 of 5 choices - - - Choice 1 of 5 choices - - - Helper types for active patterns with 5 choices. - Choices and Results - - - Choice 4 of 4 choices - - - Choice 3 of 4 choices - - - Choice 2 of 4 choices - - - Choice 1 of 4 choices - - - Helper types for active patterns with 4 choices. - Choices and Results - - - Choice 3 of 3 choices - - - Choice 2 of 3 choices - - - Choice 1 of 3 choices - - - Helper types for active patterns with 3 choices. - Choices and Results - - - Choice 2 of 2 choices - - - Choice 1 of 2 choices - - - Helper types for active patterns with 2 choices. - Choices and Results - - - Represents a out-argument managed pointer in F# code. This type should only be used with F# 4.5+. - ByRef and Pointer Types - - - Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+. - ByRef and Pointer Types - - - Represents a managed pointer in F# code. For F# 4.5+ this is considered equivalent to byref<'T, ByRefKinds.InOut> - ByRef and Pointer Types - - - Represents a managed pointer in F# code. - ByRef and Pointer Types - - - The type of 32-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 8-bit unsigned 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - The type of single-precision 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 - . - - Basic Types with Units of Measure - - - The type of double-precision 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 - . - - Basic Types with Units of Measure - - - The type of machine-sized unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 64-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 16-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 8-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 32-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of machine-sized 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - The type of single-precision 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 - . - - - Basic Types with Units of Measure - - - The type of double-precision 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 - . - - Basic Types with Units of Measure - - - Indicates a function that should be called in a tail recursive way inside its recursive scope. - A warning is emitted if the function is analyzed as not tail recursive after the optimization phase. - - Attributes - - - - let mul x y = x * y - [<TailCall>] - let rec fact n acc = - if n = 0 - then acc - else (fact (n - 1) (mul n acc)) + 23 // warning because of the addition after the call to fact - - - - - Creates an instance of the attribute - NoCompilerInliningAttribute - - - Indicates a value or a function that must not be inlined by the F# compiler, - but may be inlined by the JIT compiler. - - Attributes - - - Indicates the namespace or module to be automatically opened when an assembly is referenced - or an enclosing module opened. - - - Creates an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced - - The namespace or module to be automatically opened when an assembly is referenced - or an enclosing module opened. - - AutoOpenAttribute - - - Creates an attribute used to mark a module as 'automatically opened' when the enclosing namespace is opened - AutoOpenAttribute - - - Indicates a construct is automatically opened when brought into scope through - an assembly reference or then opening of the containing namespace or module. - - When applied to an assembly, this attribute must be given a string - argument, and this indicates 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 opened. - - When applied to a type or module within an assembly, then the attribute must not be given any arguments, and - the type or module is implicitly opened when its enclosing namespace or module is opened. - - - Attributes - - - Creates an instance of the attribute - RequireQualifiedAccessAttribute - - - This attribute is used to indicate that references to the elements of a module, record or union - type require explicit qualified access. - - Attributes - - - Creates an instance of the attribute - NoDynamicInvocationAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - UnverifiableAttribute - - - 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. - - Attributes - - - Indicates if the construct should always be hidden in an editing environment. - - - Indicates if the message should indicate a compiler error. Error numbers less than - 10000 are considered reserved for use by the F# compiler and libraries. - - - Indicates the number associated with the message. - - - Indicates the warning message to be emitted when F# source code uses this construct - - - Indicates if the construct should always be hidden in an editing environment. - - - Indicates if the message should indicate a compiler error. Error numbers less than - 10000 are considered reserved for use by the F# compiler and libraries. - - - Creates an instance of the attribute. - - - Indicates that a message should be emitted when F# source code uses this construct. - - Attributes - - - 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. - - - Creates an instance of the attribute - - Indicates the text to display when using the '%A' printf formatting. - - StructuredFormatDisplayAttribute - - - 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# valid values are of the form PreText {PropertyName1} PostText {PropertyName2} ... {PropertyNameX} PostText. - The property names indicate properties to evaluate and to display instead of the object itself. - - Attributes - - - Indicates the number of arguments in each argument group - - - Creates an instance of the attribute - - Indicates the number of arguments in each argument group. - - CompilationArgumentCountsAttribute - - - This attribute is generated automatically by the F# compiler to tag functions and members - that accept a partial application of some of their arguments and return a residual function. - - - Attributes - - - Creates an instance of the attribute - InlineIfLambdaAttribute - - - Adding this attribute to a parameter of function type indicates that, if the overall function or method is inlined and the parameter is - determined to be a known lambda, then this function should be statically inlined throughout the body of the function of method. - - If the function parameter is called multiple times in the implementation of the function or method this attribute may cause code explosion and slow compilation times. - - Attributes - - - Indicates the warning message to be emitted when F# source code uses this construct - - - Creates an instance of the attribute - - The warning message to be emitted when code uses this construct. - - ExperimentalAttribute - - - This attribute is used to tag values that are part of an experimental library - feature. - - Attributes - - - Indicates one or more adjustments to the compiled representation of an F# type or member - - - Creates an instance of the attribute - - Indicates adjustments to the compiled representation of the type or member. - - CompilationRepresentationAttribute - - - 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. - - - Attributes - - - Indicates the name of the entity in F# source code - - - Creates an instance of the attribute - - The name of the method in source. - - CompilationSourceNameAttribute - - - This attribute is inserted automatically by the F# compiler to tag - methods which are given the 'CompiledName' attribute. - - This attribute is used by the functions in the - FSharp.Reflection namespace to reverse-map compiled constructs to - their original forms. It is not intended for use from user code. - - - Attributes - - - Indicates the variant number of the entity, if any, in a linear sequence of elements with F# source code - - - Indicates the type definitions needed to resolve the source construct - - - 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 - - - Indicates the resource the source construct relates to - - - Creates an instance of the attribute - - Indicates the type definitions needed to resolve the source construct. - The name of the resource needed to resolve the source construct. - - CompilationMappingAttribute - - - Creates an instance of the attribute - - Indicates the type of source construct. - Indicates the index in the sequence of variants. - Indicates the index in the sequence of constructs. - - CompilationMappingAttribute - - - Creates an instance of the attribute - - Indicates the type of source construct. - Indicates the index in the sequence of constructs. - - CompilationMappingAttribute - - - Creates an instance of the attribute - - Indicates the type of source construct. - - CompilationMappingAttribute - - - This attribute is inserted automatically by the F# compiler to tag types - and methods in the generated CLI code with flags indicating the correspondence - with original source constructs. - - This attribute is used by the functions in the - FSharp.Reflection namespace to reverse-map compiled constructs to - their original forms. It is not intended for use from user code. - - Attributes - - - 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 - - - Creates an instance of the attribute - - The major version number. - The minor version number. - The release number. - - FSharpInterfaceDataVersionAttribute - - - 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. - - Attributes - - - The value of the attribute, indicating whether the type is automatically marked serializable or not - - - Creates an instance of the attribute - - Indicates whether the type should be serializable by default. - - AutoSerializableAttribute - - - Adding this attribute to a type with value 'false' disables the behaviour where F# makes the - type Serializable by default. - - Attributes - - - The name of the value as it appears in compiled code - - - Creates an instance of the attribute - - The name to use in compiled code. - - CompiledNameAttribute - - - Adding this attribute to a value or function definition in an F# module changes the name used - for the value in compiled CLI code. - - Attributes - - - Creates an instance of the attribute - GeneralizableValueAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - RequiresExplicitTypeArgumentsAttribute - - - Adding this attribute to a type, value or member requires that - uses of the construct must explicitly instantiate any generic type parameters. - - Attributes - - - Creates an instance of the attribute - OptionalArgumentAttribute - - - This attribute is added automatically for all optional arguments. - - Attributes - - - Indicates if a constraint is asserted that the field type supports 'null' - - - Creates an instance of the attribute - - Indicates whether to assert that the field type supports null. - - DefaultValueAttribute - - - Creates an instance of the attribute - DefaultValueAttribute - - - 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. - - - Attributes - - - Creates an instance of the attribute - NoComparisonAttribute - - - Adding this attribute to a type indicates it is a type where comparison is an abnormal operation. - This means that the type does not satisfy the F# 'comparison' constraint. Within the bounds of the - F# type system, this helps ensure that the F# generic comparison function is not instantiated directly - at this type. The attribute and checking does not constrain the use of comparison with base or child - types of this type. - - - Attributes - - - Creates an instance of the attribute - CustomComparisonAttribute - - - Adding this attribute to a type indicates it is a type with a user-defined implementation of comparison. - - Attributes - - - Creates an instance of the attribute - CustomEqualityAttribute - - - Adding this attribute to a type indicates it is a type with a user-defined implementation of equality. - - Attributes - - - Creates an instance of the attribute - NoEqualityAttribute - - - Adding this attribute to a type indicates it is a type where equality is an abnormal operation. - This means that the type does not satisfy the F# 'equality' constraint. Within the bounds of the - F# type system, this helps ensure that the F# generic equality function is not instantiated directly - at this type. The attribute and checking does not constrain the use of comparison with base or child - types of this type. - - Attributes - - - Creates an instance of the attribute - ProjectionParameterAttribute - - - Indicates that, when a custom operator is used in a computation expression, - a parameter is automatically parameterized by the variable space of the computation expression - - Attributes - - - Indicates if the custom operation maintains the variable space of the query of computation expression through the use of a bind operation - - - Indicates if the custom operation maintains the variable space of the query of computation expression - - - Indicates the name used for the 'on' part of the custom query operator for join-like operators - - - Indicates if the custom operation is an operation similar to a zip in a sequence computation, supporting two inputs - - - Indicates if the custom operation is an operation similar to a join in a sequence computation, supporting two inputs and a correlation constraint - - - Indicates if the custom operation is an operation similar to a group join in a sequence computation, supporting two inputs and a correlation constraint, and generating a group - - - Indicates if the custom operation supports the use of 'into' immediately after the use of the operation in a query or other computation expression to consume the results of the operation - - - Get the name of the custom operation when used in a query or other computation expression - - - Indicates if the custom operation maintains the variable space of the query of computation expression through the use of a bind operation - - - Indicates if the custom operation maintains the variable space of the query of computation expression - - - Indicates the name used for the 'on' part of the custom query operator for join-like operators - - - Indicates if the custom operation is an operation similar to a zip in a sequence computation, supporting two inputs - - - Indicates if the custom operation is an operation similar to a join in a sequence computation, supporting two inputs and a correlation constraint - - - Indicates if the custom operation is an operation similar to a group join in a sequence computation, supporting two inputs and a correlation constraint, and generating a group - - - Indicates if the custom operation supports the use of 'into' immediately after the use of the operation in a query or other computation expression to consume the results of the operation - - - Creates an instance of the attribute - CustomOperationAttribute - - - Indicates that a member on a computation builder type is a custom query operator, - and indicates the name of that operator. - - Attributes - - - Creates an instance of the attribute - StructuralComparisonAttribute - - - Adding this attribute to a record, union, exception, or struct type confirms the - automatic generation of implementations for 'System.IComparable' for the type. - - Attributes - - - Creates an instance of the attribute - StructuralEqualityAttribute - - - Adding this attribute to a record, union or struct type confirms the automatic - generation of overrides for 'System.Object.Equals(obj)' and - 'System.Object.GetHashCode()' for the type. - - Attributes - - - Creates an instance of the attribute - ReferenceEqualityAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - EntryPointAttribute - - - Adding this attribute to a function indicates it is the entrypoint for an application. - If this attribute is not specified for an EXE then the initialization implicit in the - module bindings in the last file in the compilation sequence are used as the entrypoint. - - Attributes - - - Creates an instance of the attribute - VolatileFieldAttribute - - - Adding this attribute to an F# mutable binding causes the "volatile" - prefix to be used for all accesses to the field. - - Attributes - - - The value of the attribute, indicating whether the type has a default augmentation or not - - - Creates an instance of the attribute - - Indicates whether to generate helper members on the CLI class representing a discriminated - union. - - DefaultAugmentationAttribute - - - 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 CLI class for that type. - - Attributes - - - Creates an instance of the attribute - CLIMutableAttribute - - - Adding this attribute to a record type causes it to be compiled to a CLI representation - with a default constructor with property getters and setters. - - Attributes - - - Creates an instance of the attribute - CLIEventAttribute - - - Adding this attribute to a property with event type causes it to be compiled with as a CLI - metadata event, through a syntactic translation to a pair of 'add_EventName' and - 'remove_EventName' methods. - - Attributes - - - Creates an instance of the attribute - LiteralAttribute - - - Adding this attribute to a value causes it to be compiled as a CLI constant literal. - - Attributes - - - The value of the attribute, indicating whether the type allows the null literal or not - - - Creates an instance of the attribute with the specified value - AllowNullLiteralAttribute - - - Creates an instance of the attribute - AllowNullLiteralAttribute - - - Adding this attribute to a type lets the 'null' literal be used for the type - within F# code. This attribute may only be added to F#-defined class or - interface types. - - Attributes - - - Creates an instance of the attribute - ClassAttribute - - - Adding this attribute to a type causes it to be represented using a CLI class. - - Attributes - - - Creates an instance of the attribute - InterfaceAttribute - - - Adding this attribute to a type causes it to be represented using a CLI interface. - - Attributes - - - Creates an instance of the attribute - MeasureAnnotatedAbbreviationAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - MeasureAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - StructAttribute - - - Adding this attribute to a type causes it to be represented using a CLI struct. - - Attributes - - - Creates an instance of the attribute - ComparisonConditionalOnAttribute - - - This attribute is used to indicate a generic container type satisfies the F# 'comparison' - constraint only if a generic argument also satisfies this constraint. - - For example, adding - this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports - comparison if the type X also supports comparison and all other conditions for C<X> to support - comparison are also met. The type C<'T> can still be used with other type arguments, but a type such - as C<(int -> int)> will not support comparison because the type (int -> int) is an F# function type - and does not support comparison. - - This attribute will be ignored if it is used on the generic parameters of functions or methods. - - - Attributes - - - Creates an instance of the attribute - EqualityConditionalOnAttribute - - - This attribute is used to indicate a generic container type satisfies the F# 'equality' - constraint only if a generic argument also satisfies this constraint. - - - - For example, adding - this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports - equality if the type X also supports equality and all other conditions for C<X> to support - equality are also met. The type C<'T> can still be used with other type arguments, but a type such - as C<(int -> int)> will not support equality because the type (int -> int) is an F# function type - and does not support equality. - - This attribute will be ignored if it is used on the generic parameters of functions or methods. - - - Attributes - - - The value of the attribute, indicating whether to include the evaluated value of the definition as the outer node of the quotation - - - Creates an instance of the attribute - - Indicates whether to include the evaluated value of the definition as the outer node of the quotation - - ReflectedDefinitionAttribute - - - Creates an instance of the attribute - ReflectedDefinitionAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - AbstractClassAttribute - - - 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. - - Attributes - - - The value of the attribute, indicating whether the type is sealed or not. - - - Creates an instance of the attribute - - Indicates whether the class is sealed. - - SealedAttribute - - - Creates an instance of the attribute. - The created attribute. - - - Adding this attribute to class definition makes it sealed, which means it may not - be extended or implemented. - - Attributes - - - Compile a property as a CLI event. - - - Permit the use of null as a representation for nullary discriminators in a discriminated union. - - - append 'Module' to the end of a module whose name clashes with a type name in the same namespace. - - - Compile a member as 'instance' even if null is used as a representation for this type. - - - Compile an instance member as 'static' . - - - No special compilation representation. - - - Indicates one or more adjustments to the compiled representation of an F# type or member. - - Attributes - - - Indicates that the compiled entity had private or internal representation in F# source code. - - - The mask of values related to the kind of the compiled entity. - - - Indicates that the compiled entity is part of the representation of an F# value declaration. - - - Indicates that the compiled entity is part of the representation of an F# union case declaration. - - - Indicates that the compiled entity is part of the representation of an F# module declaration. - - - Indicates that the compiled entity is part of the representation of an F# closure. - - - Indicates that the compiled entity is part of the representation of an F# exception declaration. - - - Indicates that the compiled entity is part of the representation of an F# record or union case field declaration. - - - Indicates that the compiled entity is part of the representation of an F# class or other object type declaration. - - - Indicates that the compiled entity is part of the representation of an F# record type declaration. - - - Indicates that the compiled entity is part of the representation of an F# union type declaration. - - - Indicates that the compiled entity has no relationship to an element in F# source code. - - - Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code. - - Attributes - - - The type 'unit', which has only one value "()". This value is special and - always uses the representation 'null'. - - Basic Types - - - - Basic definitions of operators, options, functions, results, choices, attributes and plain text formatting. - - - The type 'unit', which has only one value "()". This value is special and - always uses the representation 'null'. - - Basic Types - - - - An abbreviation for . - - Basic Types - - - Type of a formatting expression. - Function type generated by printf. - Type argument passed to %a formatters - Value generated by the overall printf action (e.g. sprint generates a string) - Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - Tuple of values generated by scan or match. - - Language Primitives - - - Type of a formatting expression. - Function type generated by printf. - Type argument passed to %a formatters - Value generated by the overall printf action (e.g. sprint generates a string) - Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - - Language Primitives - - - Construct a format string - - The input string. - The captured expressions in an interpolated string. - The types of expressions for %A expression gaps in interpolated string. - - The created format string. - - - Construct a format string - - The input string. - - The created format string. - - - Type of a formatting expression. - - Function type generated by printf. - Type argument passed to %a formatters - Value generated by the overall printf action (e.g. sprint generates a string) - Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - Tuple of values generated by scan or match. - - Language Primitives - - - The raw text of the format string. - - - The captures associated with an interpolated string. - - - The capture types associated with an interpolated string. - - - Construct a format string - The input string. - The captured expressions in an interpolated string. - The types of expressions for %A expression gaps in interpolated string. - The PrintfFormat containing the formatted result. - - - Construct a format string - The input string. - - The PrintfFormat containing the formatted result. - - - Type of a formatting expression. - - Function type generated by printf. - Type argument passed to %a formatters - Value generated by the overall printf action (e.g. sprint generates a string) - Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - - Language Primitives - - - Non-exhaustive match failures will raise the MatchFailureException exception - Language Primitives - - - maxDegreeOfParallelism must be positive, was {0} - - - This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. - - - This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. - - - This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression - - - This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. - - - An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. - - - Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal - - - 'thenBy' and 'thenByDescending' may only be used with an ordered input - - - The input sequence contains more than one element. - - - The tuple type '{0}' is invalid. Required constructor is not defined. - - - The record type '{0}' is invalid. Required constructor is not defined. - - - A continuation provided by Async.FromContinuations was invoked multiple times - - - The option value was None - - - This value cannot be mutated - - - type argument out of range - - - ill formed expression: AppOp or LetOp - - - Failed to bind assembly '{0}' while processing quotation data - - - Cannot take the address of this quotation - - - Could not bind to method - - - Could not bind property {0} in type {1} - - - Could not bind function {0} in type {1} - - - Bad format specifier (width) - - - Bad format specifier (after {0}) - - - Bad format specifier (precision) - - - Not a function type - - - Missing format specifier - - - The # formatting modifier is invalid in F# - - - Expected a width argument - - - Expected a precision argument - - - Bad integer supplied to dynamic formatter - - - Bad format specifier:{0} - - - Bad float value - - - Multiple CompilationMappingAttributes, expected at most one - - - MoveNext not called, or finished - - - first class uses of '%' or '%%' are not permitted - - - The constructor method '{0}' for the union case could not be found - - - An index satisfying the predicate was not found in the collection. - - - The method '{0}' expects {1} type arguments but {2} were provided - - - Writing a get-only property - - - F# union type requires different number of arguments - - - The tuple lengths are different - - - Tuple access out of range - - - Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). - - - Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. - - - Receiver object was unexpected, as member is static - - - Reading a set-only property - - - Parent type cannot be null - - - The member is non-static (instance), but no receiver object was supplied - - - Invalid function type - - - Incorrect type - - - Incorrect number of arguments - - - Incorrect instance type - - - Incompatible record length - - - Failed to bind type '{0}' in assembly '{1}' - - - Failed to bind property '{0}' - - - Failed to bind field '{0}' - - - Failed to bind constructor - - - The tuple index '{1}' was out of range for tuple type '{0}'. - - - The System.Threading.SynchronizationContext.Current of the calling thread is null. - - - The step of a range cannot be zero. - - - The step of a range cannot be NaN. - - - The start of a range cannot be NaN. - - - Reset is not supported on this enumerator. - - - The parameter is not a recognized method name. - - - Unexpected quotation hole in expression. - - - Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. - - - Type '{0}' did not have an F# union case named '{1}'. - - - Type '{0}' did not have an F# record field named '{1}'. - - - Not a valid F# union case index. - - - Expected exactly two type arguments. - - - Expected exactly one type argument. - - - The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. - - - The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. - - - The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. - - - The index is outside the legal range. - - - The object is null and no type was given. Either pass a non-null object or a non-null type parameter. - - - The object is not an F# record value. - - - One of the elements in the array is null. - - - This object is for recursive equality calls and cannot be used for hashing. - - - The input sequence has an insufficient number of elements. - - - The two objects have different types and are not comparable. - - - Type '{0}' is not an F# union type. - - - Type '{0}' is not a tuple type. - - - Type '{0}' is not an F# record type. - - - The function did not compute a permutation. - - - Type '{0}' is not the representation of an F# exception declaration. - - - Type '{0}' is not a function type. - - - Arrays with non-zero base cannot be created on this platform. - - - The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. - - - The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. - - - Negating the minimum value of a twos complement number is invalid. - - - The IAsyncResult object provided does not match this 'End' operation. - - - The IAsyncResult object provided does not match this 'Cancel' operation. - - - Map values cannot be mutated. - - - Mailbox.Scan timed out. - - - Mailbox.Receive timed out. - - - MailboxProcessor.PostAndReply timed out. - - - MailboxProcessor.PostAndAsyncReply timed out. - - - The MailboxProcessor has already been started. - - - The lists had different lengths. - - - The item, key, or index was not found in the collection. - - - This is not a valid tuple type for the F# reflection library. - - - The input sequence was empty. - - - The input must be positive. - - - The input must be non-negative. - - - The input list was empty. - - - The index was outside the range of elements in the list. - - - Failure during generic comparison: the type '{0}' 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. - - - Failed to read enough bytes from the stream. - - - Enumeration based on System.Int32 exceeded System.Int32.MaxValue. - - - Set contains no elements. - - - Enumeration has not started. Call MoveNext. - - - Enumeration already finished. - - - The end of a range cannot be NaN. - - - Dynamic invocation of op_Multiply involving overloading is not supported. - - - Dynamic invocation of op_Multiply involving coercions is not supported. - - - Dynamic invocation of op_Addition involving overloading is not supported. - - - Dynamic invocation of op_Addition involving coercions is not supported. - - - Dynamic invocation of DivideByInt involving coercions is not supported. - - - Expecting delegate type. - - - Input string was not in a correct format. - - - The input array was empty. - - - The arrays have different lengths. - - - First class uses of address-of operators are not permitted. - - - The match cases were incomplete - - - An active pattern to match values of type - - The input key/value pair. - - A tuple containing the key and value. - - - - let kv = System.Collections.Generic.KeyValuePair(42, "the answer") - match kv with // evaluates to "found it" - | KeyValue (42, v) -> "found it" - | KeyValue (k, v) -> "keep waiting" - - - - - - 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 - input types the operation requires an appropriate static conversion method on the input type. - - The input value. - - The converted char. - - - - char "A" // evaluates to 'A' - char 0x41 // evaluates to 'A' - char 65 // evaluates to 'A' - - - - - - Converts the argument to System.Decimal using a direct conversion for all - primitive numeric types. For strings, the input is converted using UInt64.Parse() - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted decimal. - - - - decimal "42.23" // evaluates to 42.23M - decimal 0xff // evaluates to 255M - decimal -10 // evaluates to -10M - - - - - - Converts the argument to a string using ToString. - - For standard integer and floating point values and any type that implements IFormattable - ToString conversion uses CultureInfo.InvariantCulture. - The input value. - - The converted string. - - - - string 'A' // evaluates to "A" - string 0xff // evaluates to "255" - string -10 // evaluates to "-10" - - - - - - Converts the argument to unsigned native integer using a direct conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted unativeint - - - - unativeint 'A' // evaluates to 65un - unativeint 0xff // evaluates to 255un - unativeint -10 // evaluates to 18446744073709551606un - - - - - - Converts the argument to signed native integer. This is a direct conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted nativeint - - - - nativeint 'A' // evaluates to 65n - nativeint 0xff // evaluates to 255n - nativeint -10 // evaluates to -10n - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted float - - - - float 'A' // evaluates to 65.0 - float 0xff // evaluates to 255.0 - float -10 // evaluates to -10.0 - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted float32 - - - - float32 'A' // evaluates to 65.0f - float32 0xff // evaluates to 255.0f - float32 -10 // evaluates to -10.0f - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted uint64 - - - - uint64 'A' // evaluates to 65UL - uint64 0xff // evaluates to 255UL - uint64 -10 // evaluates to 18446744073709551606UL - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int64 - - - - int64 'A' // evaluates to 65L - int64 0xff // evaluates to 255L - int64 -10 // evaluates to -10L - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted uint32 - - - - uint32 'A' // evaluates to 65u - uint32 0xff // evaluates to 255u - uint32 -10 // evaluates to 4294967286u - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int32 - - - - int32 'A' // evaluates to 65 - int32 0xff // evaluates to 255 - int32 -10 // evaluates to -10 - - - - - - Converts the argument to a particular enum type. - - The input value. - - The converted enum type. - - - - type Color = - | Red = 1 - | Green = 2 - | Blue = 3 - let c: Color = enum 3 // c evaluates to Blue - - - - - - Converts the argument to an 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int - - - - uint 'A' // evaluates to 65u - uint 0xff // evaluates to 255u - uint -10 // evaluates to 4294967286u - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int - - - - int 'A' // evaluates to 65 - int 0xff // evaluates to 255 - int -10 // evaluates to -10 - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted uint16 - - - - uint16 'A' // evaluates to 65us - uint16 0xff // evaluates to 255s - uint16 -10 // evaluates to 65526us - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int16 - - - - int16 'A' // evaluates to 65s - int16 0xff // evaluates to 255s - int16 -10 // evaluates to -10s - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted sbyte - - - - sbyte 'A' // evaluates to 65y - sbyte 0xff // evaluates to -1y - sbyte -10 // evaluates to -10y - - - - - - Converts the argument to byte. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Byte.Parse() - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted byte - - - - byte 'A' // evaluates to 65uy - byte 0xff // evaluates to 255uy - byte -10 // evaluates to 246uy - - - - - - Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. - - The input base. - The input exponent. - - The base raised to the exponent. - - - - pown 2.0 3 // evaluates to 8.0 - - - - - - Overloaded power operator. - - The input base. - The input exponent. - - The base raised to the exponent. - - - - 2.0 ** 3 // evaluates to 8.0 - - - - - - Overloaded truncate operator. - - The input value. - - The truncated value. - - - - truncate 23.92 // evaluates to 23.0 - truncate 23.92f // evaluates to 23.0f - - - - - - Hyperbolic tangent of the given number - - The input value. - - The hyperbolic tangent of the input. - - - - tanh -1.0 // evaluates to -0.761594156 - tanh 0.0 // evaluates to 0.0 - tanh 1.0 // evaluates to 0.761594156 - - - - - - Tangent of the given number - - The input value. - - The tangent of the input. - - - - tan (-0.5 * System.Math.PI) // evaluates to -1.633123935e+16 - tan (0.0 * System.Math.PI) // evaluates to 0.0 - tan (0.5 * System.Math.PI) // evaluates to 1.633123935e+16 - - - - - - Hyperbolic sine of the given number - - The input value. - - The hyperbolic sine of the input. - - - - sinh -1.0 // evaluates to -1.175201194 - sinh 0.0 // evaluates to 0.0 - sinh 1.0 // evaluates to 1.175201194 - - - - - - Sine of the given number - - The input value. - - The sine of the input. - - - - sin (0.0 * System.Math.PI) // evaluates to 0.0 - sin (0.5 * System.Math.PI) // evaluates to 1.0 - sin (1.0 * System.Math.PI) // evaluates to 1.224646799e-16 - - - - - - Hyperbolic cosine of the given number - - The input value. - - The hyperbolic cosine of the input. - - - - cosh -1.0 // evaluates to 1.543080635 - cosh 0.0 // evaluates to 1.0 - cosh 1.0 // evaluates to 1.543080635 - - - - - - Cosine of the given number - - The input value. - - The cosine of the input. - - - - cos (0.0 * System.Math.PI) // evaluates to 1.0 - cos (0.5 * System.Math.PI) // evaluates to 6.123233996e-17 - cos (1.0 * System.Math.PI) // evaluates to -1.0 - - - - - - Square root of the given number - - The input value. - - The square root of the input. - - - - sqrt 2.0 // Evaluates to 1.414213562 - sqrt 100.0 // Evaluates to 10.0 - - - - - - Logarithm to base 10 of the given number - - The input value. - - The logarithm to base 10 of the input. - - - - log10 1000.0 // Evaluates to 3.0 - log10 100000.0 // Evaluates to 5.0 - log10 0.0001 // Evaluates to -4.0 - log10 -20.0 // Evaluates to nan - - - - - - Natural logarithm of the given number - - The input value. - - The natural logarithm of the input. - - - - let logBase baseNumber value = (log value) / (log baseNumber) - logBase 2.0 32.0 // Evaluates to 5.0 - logBase 10.0 1000.0 // Evaluates to 3.0 - - - - - - Round the given number - - The input value. - - The nearest integer to the input value. - - - - round 3.49 // Evaluates to 3.0 - round -3.49 // Evaluates to -3.0 - round 3.5 // Evaluates to 4.0 - round -3.5 // Evaluates to -4.0 - - - - - - Sign of the given number - - The input value. - - -1, 0, or 1 depending on the sign of the input. - - - - sign -12.0 // Evaluates to -1 - sign 43 // Evaluates to 1 - - - - - - Floor of the given number - - The input value. - - The floor of the input. - - - - floor 12.1 // Evaluates to 12.0 - floor -1.9 // Evaluates to -2.0 - - - - - - Exponential of the given number - - The input value. - - The exponential of the input. - - - - exp 0.0 // Evaluates to 1.0 - exp 1.0 // Evaluates to 2.718281828 - exp -1.0 // Evaluates to 0.3678794412 - exp 2.0 // Evaluates to 7.389056099 - - - - - - Ceiling of the given number - - The input value. - - The ceiling of the input. - - - - ceil 12.1 // Evaluates to 13.0 - ceil -1.9 // Evaluates to -1.0 - - - - - - Inverse tangent of x/y where x and y are specified separately - - The y input value. - The x input value. - - The inverse tangent of the input ratio. - - - - let angleFromPlaneAtXY x y = atan2 y x * 180.0 / System.Math.PI - angleFromPlaneAtXY 0.0 -1.0 // Evaluates to -90.0 - angleFromPlaneAtXY 1.0 1.0 // Evaluates to 45.0 - angleFromPlaneAtXY -1.0 1.0 // Evaluates to 135.0 - - - - - - Inverse tangent of the given number - - The input value. - - The inverse tangent of the input. - - - - let angleFrom opposite adjacent = atan(opposite / adjacent) - angleFrom 5.0 5.0 // Evaluates to 0.7853981634 - - - - - - Inverse sine of the given number - - The input value. - - The inverse sine of the input. - - - - let angleFromOpposite opposite hypotenuse = asin(opposite / hypotenuse) - angleFromOpposite 6.0 10.0 // Evaluates to 0.6435011088 - angleFromOpposite 5.0 3.0 // Evaluates to nan - - - - - - Inverse cosine of the given number - - The input value. - - The inverse cosine of the input. - - - - let angleFromAdjacent adjacent hypotenuse = acos(adjacent / hypotenuse) - angleFromAdjacent 8.0 10.0 // Evaluates to 0.6435011088 - - - - - - Absolute value of the given number. - - The input value. - - The absolute value of the input. - - - - abs -12 // Evaluates to 12 - abs -15.0 // Evaluates to 15.0 - - - - - - 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. - - The limit of nodes. - The input object. - - The computed hash. - - - - - - 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 input object. - - The computed hash. - - - - hash "Bob Jones" // Evaluates to -325251320 - - - - - - Returns the internal size of a type in bytes. For example, sizeof<int> returns 4. - - - - sizeof<bool> // Evaluates to 1 - sizeof<byte> // Evaluates to 1 - sizeof<int> // Evaluates to 4 - sizeof<double> // Evaluates to 8 - sizeof<struct(byte * byte)> // Evaluates to 2 - sizeof<nativeint> // Evaluates to 4 or 8 (32-bit or 64-bit) depending on your platform - - - - - - 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. - - - - typeof<int list;> // Evaluates to Microsoft.FSharp.Collections.FSharpList`1[System.Int32] - typedefof<int list;> // Evaluates to Microsoft.FSharp.Collections.FSharpList`1[T] /// - - - - - - An internal, library-only compiler intrinsic for compile-time - generation of a RuntimeMethodHandle. - - - Returns the name of the given symbol. - - - - let myVariableName = "This value doesn't matter" - nameof(myVariableName) // Evaluates to "myVariableName" - - - - - - Generate a System.Type runtime representation of a static type. - - - - let t = typeof<int> // Gets the System.Type - t.FullName // Evaluates to "System.Int32" - - - - - - 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. - - The resource to be disposed after action is called. - The action that accepts the resource. - - The resulting value. - - - The following code appends 10 lines to test.txt, then closes the StreamWriter when finished. - - open System.IO - - using (File.AppendText "test.txt") (fun writer -> - for i in 1 .. 10 do - writer.WriteLine("Hello World {0}", i)) - - - - - - - Execute the function as a mutual-exclusion region using the input value as a lock. - - The object to be locked. - The action to perform during the lock. - - The resulting value. - - - - open System.Linq - - /// A counter object, supporting unlocked and locked increment - type TestCounter () = - let mutable count = 0 - - /// Increment the counter, unlocked - member this.IncrementWithoutLock() = - count <- count + 1 - - /// Increment the counter, locked - member this.IncrementWithLock() = - lock this (fun () -> count <- count + 1) - - /// Get the count - member this.Count = count - - let counter = TestCounter() - - // Create a parallel sequence to that uses all our CPUs - (seq {1..100000}).AsParallel() - .ForAll(fun _ -> counter.IncrementWithoutLock()) - - // Evaluates to a number between 1-100000, non-deterministically because there is no locking - counter.Count - - let counter2 = TestCounter() - - // Create a parallel sequence to that uses all our CPUs - (seq {1..100000}).AsParallel() - .ForAll(fun _ -> counter2.IncrementWithLock()) - - // Evaluates to 100000 deterministically because the increment to the counter object is locked - counter2.Count - - - - - - The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences - - The start value of the range. - The step value of the range. - The end value of the range. - - The sequence spanning the range using the specified step size. - - - - [1..2..6] // Evaluates to [1; 3; 5] - [1.1..0.2..1.5] // Evaluates to [1.1; 1.3; 1.5] - ['a'..'e'] // Evaluates to ['a'; 'b'; 'c'; 'd'; 'e'] - - - - - - The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences - - The start value of the range. - The end value of the range. - - The sequence spanning the range. - - - - [1..4] // Evaluates to [1; 2; 3; 4] - [1.5..4.4] // Evaluates to [1.5; 2.5; 3.5] - ['a'..'d'] // Evaluates to ['a'; 'b'; 'c'; 'd'] - - [|1..4|] // Evaluates to an array [|1; 2; 3; 4|] - { 1..4 } // Evaluates to a sequence [1; 2; 3; 4]) - - - - - - Reads the value of the property . - - - Reads the value of the property . - - - Reads the value of the property . - - - Equivalent to - - - Equivalent to - - - Equivalent to - - - Equivalent to - - - Exit the current hardware isolated process, if security settings permit, - otherwise raise an exception. Calls . - - The exit code to use. - - Never returns. - - - - [<EntryPoint>] - let main argv = - if argv.Length = 0 then - eprintfn "You must provide arguments" - exit(-1) // Causes program to quit with an error code - printfn "Argument count: %i" argv.Length - 0 - - - - - - Builds a sequence using sequence expression syntax - - The input sequence. - - The result sequence. - - - - seq { for i in 0..10 do yield (i, i*i) } - - - - - - Negate a logical value. Not True equals False and not False equals True - - The value to negate. - - The result of the negation. - - - - not (2 + 2 = 5) // Evaluates to true - - // not is a function that can be compose with other functions - let fileDoesNotExist = System.IO.File.Exists >> not - - - - - - Concatenate two lists. - - The first list. - The second list. - - The concatenation of the lists. - - - - let l1 = ['a'; 'b'; 'c'] - let l2 = ['d'; 'e'; 'f'] - l1 @ l2 // Evalulates to ['a'; 'b'; 'c'; 'd'; 'e'; 'f'] - - - - - - Increment a mutable reference cell containing an integer - - The reference cell. - - - - let count = ref 99 // Creates a reference cell object with a mutable Value property - incr count // Increments our counter - count.Value // Evaluates to 100 - - - - - - Decrement a mutable reference cell containing an integer - - The reference cell. - - - - let count = ref 99 // Creates a reference cell object with a mutable Value property - decr count // Decrements our counter - count.Value // Evaluates to 98 - - - - - - Dereference a mutable reference cell - - The cell to dereference. - - The value contained in the cell. - - - - let count = ref 12 // Creates a reference cell object with a mutable Value property - count.Value // Evaluates to 12 - !count // Also evaluates to 12 (with shorter syntax) - - - - - - Assign to a mutable reference cell - - The cell to mutate. - The value to set inside the cell. - - - - let count = ref 0 // Creates a reference cell object with a mutable Value property - count.Value <- 1 // Updates the value - count := 2 // Also updates the value, but with shorter syntax - count.Value // Evaluates to 2 - - - - - - Create a mutable reference cell - - The value to contain in the cell. - - The created reference cell. - - - - let count = ref 0 // Creates a reference cell object with a mutable Value property - count.Value // Evaluates to 0 - count.Value <- 1 // Updates the value - count.Value // Evaluates to 1 - - - - - - The identity function - - The input value. - - The same value. - - - - id 12 // Evaulates to 12 - id "abc" // Evaulates to "abc" - - - - - - Throw a exception - - The exception message. - - The result value. - - - - type FileReader(fileName: string) = - let mutable isOpen = false - member this.Open() = - if isOpen then invalidOp "File is already open" - // ... Here we may open the file ... - isOpen <- true - - let reader = FileReader("journal.txt") - reader.Open() // Executes fine - reader.Open() // Throws System.InvalidOperationException: File is already open - - - - - - Throw a exception - - The argument name. - - Never returns. - - - - let fullName firstName lastName = - if isNull firstName then nullArg (nameof(firstName)) - if isNull lastName then nullArg (nameof(lastName)) - firstName + " " + lastName - - fullName null "Jones" // Throws System.ArgumentNullException: Value cannot be null. (Parameter 'firstName') - - - - - - Throw a exception with - the given argument name and message. - - The argument name. - The exception message. - - Never returns. - - - - let fullName firstName lastName = - if String.IsNullOrWhiteSpace(firstName) then - invalidArg (nameof(firstName)) "First name can't be null or blank" - if String.IsNullOrWhiteSpace(lastName) then - invalidArg (nameof(lastName)) "Last name can't be null or blank" - firstName + " " + lastName - - fullName null "Jones" - - Throws System.ArgumentException: First name can't be null or blank (Parameter 'firstName') - - - - - Throw a exception. - - The exception message. - - Never returns. - - - - let failingFunction() = - failwith "Oh no" // Throws an exception - true // Never reaches this - - failingFunction() // Throws a System.Exception - - - - - - Determines whether the given value is not null. - - The value to check. - - True when value is not null, false otherwise. - - - Determines whether the given value is null. - - The value to check. - - True when value is null, false otherwise. - - - - isNull null // Evaluates to true - isNull "Not null" // Evaluates to false - - - - - - Try to unbox a strongly typed value. - - The boxed value. - - The unboxed result as an option. - - - - let x: int = 123 - let obj1 = box x // obj1 is a generic object type - tryUnbox<int> obj1 // Evaluates to Some(123) - tryUnbox<double> obj1 // Evaluates to None - - - - - - Boxes a strongly typed value. - - The value to box. - - The boxed object. - - - - let x: int = 123 - let obj1 = box x // obj1 is a generic object type - unbox<int> obj1 // Evaluates to 123 (int) - unbox<double> obj1 // Throws System.InvalidCastException - - - - - - Unbox a strongly typed value. - - The boxed value. - - The unboxed result. - - - - let x: int = 123 - let obj1 = box x // obj1 is a generic object type - unbox<int> obj1 // Evaluates to 123 (int) - unbox<double> obj1 // Throws System.InvalidCastException - - - - - - Ignore the passed value. This is often used to throw away results of a computation. - - The value to ignore. - - - - ignore 55555 // Evaluates to () - - - - - - Minimum based on generic comparison - - The first value. - The second value. - - The minimum value. - - - - min 1 2 // Evaluates to 1 - min [1;2;3] [1;2;4] // Evaluates to [1;2;3] - min "zoo" "alpha" // Evaluates to "alpha" - - - - - - Maximum based on generic comparison - - The first value. - The second value. - - The maximum value. - - - - max 1 2 // Evaluates to 2 - max [1;2;3] [1;2;4] // Evaluates to [1;2;4] - max "zoo" "alpha" // Evaluates to "zoo" - - - - - - Generic comparison. - - The first value. - The second value. - - The result of the comparison. - - - - compare 1 2 // Evaluates to -1 - compare [1;2;3] [1;2;4] // Evaluates to -1 - compare 2 2 // Evaluates to 0 - compare [1;2;3] [1;2;3] // Evaluates to 0 - compare 2 1 // Evaluates to 1 - compare [1;2;4] [1;2;3] // Evaluates to 1 - - - - - - Return the second element of a tuple, snd (a,b) = b. - - The input tuple. - - The second value. - - - - snd ("first", 2) // Evaluates to 2 - - - - - - Return the first element of a tuple, fst (a,b) = a. - - The input tuple. - - The first value. - - - - fst ("first", 2) // Evaluates to "first" - - - - - - Matches objects whose runtime type is precisely - - The input exception. - - A string option. - - - - - - Builds a object. - - The message for the Exception. - - A System.Exception. - - - - let throwException() = - raise(Failure("Oh no!!!")) - true // Never gets here - - throwException() // Throws a generic Exception class - - - - - - Rethrows an exception. This should only be used when handling an exception - The result value. - - - - let readFile (fileName: string) = - try - File.ReadAllText(fileName) - with ex -> - eprintfn "Couldn't read %s" fileName - reraise() - - readFile "/this-file-doest-exist" - // Prints the message to stderr - // Throws a System.IO.FileNotFoundException - - - - - - Rethrows an exception. This should only be used when handling an exception - The result value. - - - Raises an exception - - The exception to raise. - - The result value. - - - - open System.IO - exception FileNotFoundException of string - - let readFile (fileName: string) = - if not (File.Exists(fileName)) then - raise(FileNotFoundException(fileName)) - File.ReadAllText(fileName) - - readFile "/this-file-doest-exist" - - When executed, raises a FileNotFoundException. - - - - - Concatenate two strings. The operator '+' may also be used. - - - Used to specify a default value for an optional argument in the implementation of a function - - A value option representing the argument. - The default value of the argument. - - The argument value. If it is None, the defaultValue is returned. - - - - let arg1 = ValueSome(5) - defaultValueArg arg1 6 // Evaluates to 5 - defaultValueArg ValueNone 6 // Evaluates to 6 - - - - - - Used to specify a default value for an optional argument in the implementation of a function - - An option representing the argument. - The default value of the argument. - - The argument value. If it is None, the defaultValue is returned. - - - - type Vector(x: double, y: double, ?z: double) = - let z = defaultArg z 0.0 - member this.X = x - member this.Y = y - member this.Z = z - - let v1 = Vector(1.0, 2.0) - v1.Z // Evaluates to 0. - let v2 = Vector(1.0, 2.0, 3.0) - v2.Z // Evaluates to 3.0 - - - - - - Apply a function to three values, the values being a triple on the right, the function on the left - - The function. - The first argument. - The second argument. - The third argument. - - The function result. - - - - let sum3 x y z = x + y + z - sum3 <||| (3, 4, 5) // Evaluates to 12 - - - - - - Apply a function to two values, the values being a pair on the right, the function on the left - - The function. - The first argument. - The second argument. - - The function result. - - - - let sum x y = x + y - sum <|| (3, 4) // Evaluates to 7 - - - - - - Apply a function to a value, the value being on the right, the function on the left - - The function. - The argument. - - The function result. - - - - let doubleIt x = x * 2 - doubleIt <| 3 // Evaluates to 6 - - - - - - Apply a function to three values, the values being a triple on the left, the function on the right - - The first argument. - The second argument. - The third argument. - The function. - - The function result. - - - - let sum3 x y z = x + y + z - (3, 4, 5) |||> sum3 // Evaluates to 12 - - - - - - Apply a function to two values, the values being a pair on the left, the function on the right - - The first argument. - The second argument. - The function. - - The function result. - - - - let sum x y = x + y - (3, 4) ||> sum // Evaluates to 7 - - - - - - Apply a function to a value, the value being on the left, the function on the right - - The argument. - The function. - - The function result. - - - - let doubleIt x = x * 2 - 3 |> doubleIt // Evaluates to 6 - - - - - - Compose two functions, the function on the right being applied first - - The second function to apply. - The first function to apply. - - The composition of the input functions. - - - - let addOne x = x + 1 - let doubleIt x = x * 2 - let doubleThenAdd = addOne << doubleIt - doubleThenAdd 3 - - - - - - Compose two functions, the function on the left being applied first - - The first function to apply. - The second function to apply. - - The composition of the input functions. - - - - let addOne x = x + 1 - let doubleIt x = x * 2 - let addThenDouble = addOne >> doubleIt - addThenDouble 3 // Evaluates to 8 - - - - - - Structural inequality - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 <> 5 // Evaluates to false - 5 <> 6 // Evaluates to true - [1; 2] <> [1; 2] // Evaluates to false - - - - - - Structural equality - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 = 5 // Evaluates to true - 5 = 6 // Evaluates to false - [1; 2] = [1; 2] // Evaluates to true - (1, 5) = (1, 6) // Evaluates to false - - - - - - Structural less-than-or-equal comparison - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 <= 1 // Evaluates to false - 5 <= 5 // Evaluates to true - [1; 5] <= [1; 6] // Evaluates to true - - - - - - Structural greater-than-or-equal - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 >= 1 // Evaluates to true - 5 >= 5 // Evaluates to true - [1; 5] >= [1; 6] // Evaluates to false - - - - - - Structural greater-than - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 > 1 // Evaluates to true - 5 > 5 // Evaluates to false - (1, "a") > (1, "z") // Evaluates to false - - - - - - Structural less-than comparison - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 1 < 5 // Evaluates to true - 5 < 5 // Evaluates to false - (1, "a") < (1, "z") // Evaluates to true - - - - - - Overloaded prefix-plus operator - - The input value. - - The result of the operation. - - - - - - Overloaded bitwise-NOT operator - - The input value. - - The result of the operation. - - - - let byte1 = 60uy // 00111100 - let byte2 = ~~~b1 // 11000011 - - Evaluates to 195 - - - - - Overloaded byte-shift right operator by a specified number of bits - - The input value. - The amount to shift. - - The result of the operation. - - - - let a = 206 // 00000000000000000000000011010000 - let c1 = a >>> 2 // 00000000000000000000000000110100 - // Evaluates to 51 - let c2 = a >>> 6 // 00000000000000000000000000000011 - Evaluates to 3 - - - - - Overloaded byte-shift left operator by a specified number of bits - - The input value. - The amount to shift. - - The result of the operation. - - - - let a = 13 // 00000000000000000000000000001101 - let c = a <<< 4 // 00000000000000000000000011010000 - - Evaluates to 208 - - - - Overloaded bitwise-XOR operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - let a = 13 // 00000000000000000000000000001101 - let b = 11 // 00000000000000000000000000001011 - let c = a ^^^ b // 00000000000000000000000000000110 - - Evaluates to 6 - - - - Overloaded bitwise-OR operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - let a = 13 // 00000000000000000000000000001101 - let b = 11 // 00000000000000000000000000001011 - let c = a ||| b // 00000000000000000000000000001111 - - Evaluates to 15 - - - - Overloaded bitwise-AND operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - let a = 13 // 00000000000000000000000000001101 - let b = 11 // 00000000000000000000000000001011 - let c = a &&& b // 00000000000000000000000000001001 - - Evaluates to 9 - - - - Overloaded modulo operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 29 % 5 // Evaluates to 4 - - - - - Overloaded division operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 16 / 2 // Evaluates to 8 - - - - - Overloaded multiplication operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 8 * 6 // Evaluates to 48 - - - - - Overloaded subtraction operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 10 - 2 // Evaluates to 8 - - - - - Overloaded addition operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 2 + 2 // Evaluates to 4 - "Hello " + "Word" // Evaluates to "Hello World" - - - - - - Overloaded unary negation. - - The value to negate. - - The result of the operation. - - - - - - Converts the argument to char. Numeric inputs are converted using a checked - conversion according to the UTF-16 encoding for characters. String inputs must - be exactly one character long. For other input types the operation requires an - appropriate static conversion method on the input type. - - The input value. - - The converted char - - - - - - Converts the argument to unativeint. This is a direct, checked conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted unativeint - - - - - - Converts the argument to . This is a direct, checked conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted nativeint - - - - - - Converts the argument to uint64. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint64 - - - - - - Converts the argument to int64. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int64 - - - - - - Converts the argument to uint32. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint32 - - - - - - Converts the argument to int32. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int32 - - - - - - Converts the argument to int. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int - - - - - - Converts the argument to uint16. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint16 - - - - - - Converts the argument to int16. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int16 - - - - - - Converts the argument to sbyte. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted sbyte - - - - - - Converts the argument to byte. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted byte - - - - - - Overloaded multiplication operator (checks for overflow) - - The first value. - The second value. - - The product of the two input values. - - - - - - Overloaded addition operator (checks for overflow) - - The first value. - The second value. - - The sum of the two input values. - - - - - - Overloaded subtraction operator (checks for overflow) - - The first value. - The second value. - - The first value minus the second value. - - - - - - Overloaded unary negation (checks for overflow) - - The input value. - - The negated value. - - - - - - This module contains the basic arithmetic operations with overflow checks. - - - Calls GetHashCode() on the value - - The value. - - The hash code. - - - - - - Minimum of the two values - - The first value. - The second value. - - The minimum value. - - - - - - Maximum of the two values - - The first value. - The second value. - - The maximum value. - - - - - - Compares the two values - - The first value. - The second value. - - The result of the comparison. - - - - - - Compares the two values for inequality - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for equality - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for less-than-or-equal - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for greater-than-or-equal - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for greater-than - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for less-than - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - A module of comparison and equality operators that are statically resolved, but which are not fully generic and do not make structural comparison. Opening this - module may make code that relies on structural or generic comparison no longer compile. - - - Perform generic hashing on a value where the type of the value is not - statically required to satisfy the 'equality' constraint. - The computed hash value. - - - - - - Perform generic equality on two values where the type of the values is not - statically required to satisfy the 'equality' constraint. - The result of the comparison. - - - - - - Perform generic comparison on two values where the type of the values is not - statically required to have the 'comparison' constraint. - The result of the comparison. - - - - - - Generate a default 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. - - - - - - Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. - - The boxed value. - - The unboxed result. - - - - - - This module contains basic operations which do not apply runtime and/or static checks - - - 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 '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 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 'unativeint' - - - 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 'uint64' - - - 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 'uint32' - - - 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 'uint16' - - - 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 'sbyte' - - - 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 evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - Generate a range of values using the given zero, add, start, step and stop values - - - Generate a range of values using the given zero, add, start, step and stop values - - - Generate a range of char values - - - Generate a range of byte values - - - Generate a range of sbyte values - - - Generate a range of uint16 values - - - Generate a range of int16 values - - - Generate a range of unativeint values - - - Generate a range of nativeint values - - - Generate a range of uint32 values - - - Generate a range of uint64 values - - - Generate a range of int64 values - - - Generate a range of float32 values - - - Generate a range of float values - - - Generate a range of integers - - - Gets a slice from a string - - The source string. - The index of the first character of the slice. - The index of the last character of the slice. - - The substring from the given indices. - - - Sets a slice of an array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 1D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 1D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 1D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 1D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 3D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 3D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 3D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 3D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Gets a 1D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The one dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 3D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - - The three dimensional sub array from the given indices. - - - Gets a 3D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The three dimensional sub array from the given indices. - - - Gets a 3D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The three dimensional sub array from the given indices. - - - Gets a 3D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The three dimensional sub array from the given indices. - - - Gets a slice of an array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The four dimensional sub array from the given indices. - - - Sets a 1D slice of a 3D array. - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The source array. - - The one dimensional sub array from the given indices. - - - Sets a 1D slice of a 3D array. - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The source array. - - The one dimensional sub array from the given indices. - - - Sets a 1D slice of a 3D array. - - The target array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The source array. - - The one dimensional sub array from the given indices. - - - Sets a 2D slice of a 3D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The source array. - - The two dimensional sub array from the given indices. - - - Sets a 2D slice of a 3D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The source array. - - The two dimensional sub array from the given indices. - - - Sets a 2D slice of a 3D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The source array. - - The two dimensional sub array from the given indices. - - - Sets a slice of an array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The source array. - - - Gets a 1D slice of a 3D array. - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 3D array. - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 3D array. - - The source array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - - The one dimensional sub array from the given indices. - - - Gets a 2D slice of a 3D array. - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 3D array. - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 3D array. - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - - The two dimensional sub array from the given indices. - - - Gets a slice of an array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - - The three dimensional sub array from the given indices. - - - Sets a vector slice of a 2D array. The index of the second dimension is fixed. - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The index of the second dimension. - The source array. - - - Sets a vector slice of a 2D array. The index of the first dimension is fixed. - - The target array. - The index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The source array. - - - Sets a region slice of an array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The source array. - - - Gets a vector slice of a 2D array. The index of the second dimension is fixed. - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - - The sub array from the input indices. - - - Gets a vector slice of a 2D array. The index of the first dimension is fixed. - - The source array. - The index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - - The sub array from the input indices. - - - Gets a region slice of an array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - - The two dimensional sub array from the input indices. - - - Sets a slice of an array - - The target array. - The start index. - The end index. - The source array. - - - Gets a slice of an array - - The input array. - The start index. - The end index. - - The sub array from the input indices. - - - A module of compiler intrinsic functions for efficient implementations of F# integer ranges - and dynamic invocations of other F# operators - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. - The offset from the end. - - The corresponding index from the start. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. - The offset from the end. - - The corresponding index from the start. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. This refers to the dimension in the 2d array. - The offset from the end. - - The corresponding index from the start. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. This refers to the dimension in the 3d array. - The offset from the end. - - The corresponding index from the start. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. This refers to the dimension in the 4d array. - The offset from the end. - - The corresponding index from the start. - - - Contains extension methods to allow the use of F# indexer notation with arrays. - This module is automatically opened in all F# code. - - - Basic F# Operators. This module is automatically opened in all F# code. - - Basic Operators - - - Invoke an F# first class function value that accepts five curried arguments - without intervening execution - - The first arg. - The second arg. - The third arg. - The fourth arg. - The fifth arg. - - The function result. - - - Adapt an F# first class function value to be an optimized function value that can - accept five curried arguments without intervening execution. - - The input function. - - The optimized function. - - - Construct an optimized function value that can accept five curried - arguments without intervening execution. - The optimized function. - - - The CLI type used to represent F# function values that accept five curried arguments - without intervening execution. This type should not typically used directly from - either F# code or from other CLI languages. - - - Invoke an F# first class function value that accepts four curried arguments - without intervening execution - - The first arg. - The second arg. - The third arg. - The fourth arg. - - The function result. - - - Adapt an F# first class function value to be an optimized function value that can - accept four curried arguments without intervening execution. - - The input function. - - The optimized function. - - - Construct an optimized function value that can accept four curried - arguments without intervening execution. - The optimized function. - - - The CLI type used to represent F# function values that accept four curried arguments - without intervening execution. This type should not typically used directly from - either F# code or from other CLI languages. - - - Invoke an F# first class function value that accepts three curried arguments - without intervening execution - - The first arg. - The second arg. - The third arg. - - The function result. - - - Adapt an F# first class function value to be an optimized function value that can - accept three curried arguments without intervening execution. - - The input function. - - The adapted function. - - - Construct an optimized function value that can accept three curried - arguments without intervening execution. - The optimized function. - - - The CLI 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 CLI languages. - - - Invoke the optimized function value with two curried arguments - - The first arg. - The second arg. - - The function result. - - - Adapt an F# first class function value to be an optimized function value that can - accept two curried arguments without intervening execution. - - The input function. - - The adapted function. - - - Construct an optimized function value that can accept two curried - arguments without intervening execution. - The optimized function. - - - The CLI 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 CLI languages. - - - An implementation module used to hold some private implementations of function - value invocation. - Language Primitives - - - Divides a value by an integer. - - The input value. - The input int. - - The division result. - - - Resolves to the value 'one' 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' - - - A compiler intrinsic that implements dynamic invocations for the DivideByInt primitive. - - - A compiler intrinsic that implements dynamic invocations related to the '=' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '=' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '>=' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '<=' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '>' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '<' operator. - - - A compiler intrinsic that implements dynamic invocations related to checked conversion operators. - - - A compiler intrinsic that implements dynamic invocations related to conversion operators. - - - A compiler intrinsic that implements dynamic invocations related to the '~~~' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '^^^' operator. - - - A compiler intrinsic that implements dynamic invocations to the '|||' operator. - - - A compiler intrinsic that implements dynamic invocations to the '&&&' operator. - - - A compiler intrinsic that implements dynamic invocations to the '>>>' operator. - - - A compiler intrinsic that implements dynamic invocations to the '<<<' operator. - - - A compiler intrinsic that implements dynamic invocations to the checked unary '-' operator. - - - A compiler intrinsic that implements dynamic invocations to the checked '-' operator. - - - A compiler intrinsic that implements dynamic invocations to the '%' operator. - - - A compiler intrinsic that implements dynamic invocations to the unary '-' operator. - - - A compiler intrinsic that implements dynamic invocations to the '/' operator. - - - 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 '*' operator. - - - A compiler intrinsic that implements dynamic invocations to the checked '+' operator. - - - A compiler intrinsic that implements dynamic invocations to the '+' operator. - - - Resolves to the value 'one' 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'. - - - Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings - - The input string. - - The parsed value. - - - Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings - - The input string. - - The parsed value. - - - Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings - - The input string. - - The parsed value. - - - Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings - - The input string. - - The parsed value. - - - Creates a unativeint value with units-of-measure - - The input unativeint. - - The unativeint with units-of-measure. - - - Creates a byte value with units-of-measure - - The input byte. - - The byte with units-of-measure. - - - Creates a uint16 value with units-of-measure - - The input uint16. - - The uint16 with units-of-measure. - - - Creates a uint64 value with units-of-measure - - The input uint64. - - The uint64 with units-of-measure. - - - Creates a uint value with units-of-measure - - The input uint. - - The uint with units-of-measure. - - - Creates a nativeint value with units-of-measure - - The input nativeint. - - The nativeint with units-of-measure. - - - Creates an sbyte value with units-of-measure - - The input sbyte. - - The sbyte with units-of-measure. - - - Creates an int16 value with units-of-measure - - The input int16. - - The int16 with units-of-measure. - - - Creates an int64 value with units-of-measure - - The input int64. - - The int64 with units of measure. - - - Creates an int32 value with units-of-measure - - The input int. - - The int with units of measure. - - - Creates a decimal value with units-of-measure - - The input decimal. - - The decimal with units of measure. - - - Creates a float32 value with units-of-measure - - The input float. - - The float with units-of-measure. - - - Creates a float value with units-of-measure - - The input float. - - The float with units-of-measure. - - - Get the underlying value for an enum value - - The input enum. - - The enumeration as a value. - - - Build an enum value from an underlying value - - The input value. - - The value as an enumeration. - - - Recursively hash a part of a value according to its structure. - - The comparison function. - The input object. - - The hashed value. - - - Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# - records, lists and union types. - - The limit on the number of nodes. - The input object. - - The hashed value. - - - 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. - - The input object. - - The hashed value. - - - 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. - - The input limit on the number of nodes. - - System.Collections.Generic.IEqualityComparer<'T> - - - Make an F# hash/equality object for the given type - - - Make an F# comparer object for the given type, where it can be null if System.Collections.Generic.Comparer<'T>.Default - - - Make an F# comparer object for the given type - - - 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. This equality comparer has equivalence - relation semantics ([nan] = [nan]). - - - 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. - - - The physical hash. Hashes on the object identity. - - The input object. - - The hashed value. - - - Reference/physical equality. - True if the inputs are reference-equal, false otherwise. - - The first value. - The second value. - - The result of the comparison. - - - Take the maximum of two values structurally according to the order given by GenericComparison - - The first value. - The second value. - - The maximum value. - - - Take the minimum of two values structurally according to the order given by GenericComparison - - The first value. - The second value. - - The minimum value. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values. May be called as a recursive case from an implementation of System.IComparable to - ensure consistent NaN comparison semantics. - - The function to compare the values. - The first value. - The second value. - - The result of the comparison. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values for equality - - - The first value. - The second value. - - The result of the comparison. - - - Compare two values for equality using equivalence relation semantics ([nan] = [nan]) - - The first value. - The second value. - - The result of the comparison. - - - Compare two values for equality using partial equivalence relation semantics ([nan] <> [nan]) - - The first value. - The second value. - - The result of the comparison. - - - 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. - - - 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 - - - - The standard overloaded associative (4-indexed) mutation operator - - - - The standard overloaded associative (3-indexed) mutation operator - - - The standard overloaded associative (2-indexed) mutation operator - - - The standard overloaded associative (indexed) mutation operator - - - The standard overloaded associative (4-indexed) lookup operator - - - The standard overloaded associative (3-indexed) lookup operator - - - The standard overloaded associative (2-indexed) lookup operator - - - The standard overloaded associative (indexed) lookup operator - - - A compiler intrinsic for checking initialization soundness of recursive bindings - - - A compiler intrinsic for checking initialization soundness of recursive static bindings - - - A compiler intrinsic for checking initialization soundness of recursive bindings - - - A compiler intrinsic for the efficient compilation of sequence expressions - - - This function implements parsing of decimal constants - - - This function implements calls to default constructors - accessed by 'new' constraints. - - - Primitive used by pattern match compilation - - - 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. - - The input object. - - The unmanaged pointer. - - - Address-of. Uses of this value may result in the generation of unverifiable code. - - The input object. - - The managed pointer. - - - Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand - - The first value. - The second value. - - The result of the operation. - - - Binary 'or'. 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 - - The first value. - The second value. - - The result of the operation. - - - Binary 'and'. 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 - - - For compiler use only - - - Language primitives associated with the F# language - - Language Primitives - - - - Represents a byref that can be both read and written - - - - - Represents a byref that can be read - - - - - Represents a byref that can be written - - - - Represents the types of byrefs in F# 4.5+ - ByRef and Pointer Types - - - Convert an option to a potentially null value. - - The input value. - - The result value, which is null if the input was ValueNone. - - - - (ValueNone: string ValueOption) |> ValueOption.toObj // evaluates to null - ValueSome "not a null string" |> ValueOption.toObj // evaluates to "not a null string" - - - - - Convert a potentially null value to a value option. - - The input value. - - The result value option. - - - - (null: string) |> ValueOption.ofObj // evaluates to ValueNone - "not a null string" |> ValueOption.ofObj // evaluates to (ValueSome "not a null string") - - - - - Convert a Nullable value to a value option. - - The input nullable value. - - The result value option. - - - - System.Nullable<int>() |> ValueOption.ofNullable // evaluates to ValueNone - System.Nullable(42) |> ValueOption.ofNullable // evaluates to ValueSome 42 - - - - - Convert the value option to a Nullable value. - - The input value option. - - The result value. - - - - (ValueNone: int ValueOption) |> ValueOption.toNullable // evaluates to new System.Nullable<int>() - ValueSome 42 |> ValueOption.toNullable // evaluates to new System.Nullable(42) - - - - - Convert the value option to a list of length 0 or 1. - - The input value option. - - The result list. - - - - (ValueNone: int ValueOption) |> ValueOption.toList // evaluates to [] - ValueSome 42 |> ValueOption.toList // evaluates to [42] - - - - - Convert the value option to an array of length 0 or 1. - - The input value option. - - The result array. - - - - (ValueNone: int ValueOption) |> ValueOption.toArray // evaluates to [||] - ValueSome 42 |> ValueOption.toArray // evaluates to [|42|] - - - - - filter f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> if f x then ValueSome x else ValueNone. - - A function that evaluates whether the value contained in the value option should remain, or be filtered out. - The input value option. - - The input if the predicate evaluates to true; otherwise, ValueNone. - - - - ValueNone |> ValueOption.filter (fun x -> x >= 5) // evaluates to ValueNone - ValueSome 42 |> ValueOption.filter (fun x -> x >= 5) // evaluates to ValueSome 42 - ValueSome 4 |> ValueOption.filter (fun x -> x >= 5) // evaluates to ValueNone - - - - - flatten inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> x - - The input value option. - - The input value if the value is Some; otherwise, ValueNone. - flatten is equivalent to bind id. - - - - (ValueNone: int ValueOption ValueOption) |> ValueOption.flatten // evaluates to ValueNone - (ValueSome ((ValueNone: int ValueOption))) |> ValueOption.flatten // evaluates to ValueNone - (ValueSome (ValueSome 42)) |> ValueOption.flatten // evaluates to ValueSome 42 - - - - - bind f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> f x - - A function that takes the value of type T from a value option and transforms it into - a value option containing a value of type U. - The input value option. - - An option of the output type of the binder. - - - - let tryParse input = - match System.Int32.TryParse (input: string) with - | true, v -> ValueSome v - | false, _ -> ValueNone - ValueNone |> ValueOption.bind tryParse // evaluates to ValueNone - ValueSome "42" |> ValueOption.bind tryParse // evaluates to ValueSome 42 - ValueSome "Forty-two" |> ValueOption.bind tryParse // evaluates to ValueNone - - - - - map f voption1 voption2 voption3 evaluates to match voption1, voption2, voption3 with ValueSome x, ValueSome y, ValueSome z -> ValueSome (f x y z) | _ -> ValueNone. - - A function to apply to the value option values. - The first value option. - The second value option. - The third value option. - - A value option of the input values after applying the mapping function, or ValueNone if any input is ValueNone. - - - - (ValueNone, ValueNone, ValueNone) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueNone - (ValueSome 100, ValueNone, ValueNone) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueNone - (ValueNone, ValueSome 100, ValueNone) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueNone - (ValueNone, ValueNone, ValueSome 100) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueNone - (ValueSome 5, ValueSome 100, ValueSome 10) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueSome 115 - - - - - map f voption1 voption2 evaluates to match voption1, voption2 with ValueSome x, ValueSome y -> ValueSome (f x y) | _ -> ValueNone. - - A function to apply to the voption values. - The first value option. - The second value option. - - A value option of the input values after applying the mapping function, or ValueNone if either input is ValueNone. - - - - (ValueNone, ValueNone) ||> ValueOption.map2 (fun x y -> x + y) // evaluates to ValueNone - (ValueSome 5, ValueNone) ||> ValueOption.map2 (fun x y -> x + y) // evaluates to ValueNone - (ValueNone, ValueSome 10) ||> ValueOption.map2 (fun x y -> x + y) // evaluates to ValueNone - (ValueSome 5, ValueSome 10) ||> ValueOption.map2 (fun x y -> x + y) // evaluates to ValueSome 15 - - - - - map f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> ValueSome (f x). - - A function to apply to the voption value. - The input value option. - - A value option of the input value after applying the mapping function, or ValueNone if the input is ValueNone. - - - - ValueNone |> ValueOption.map (fun x -> x * 2) // evaluates to ValueNone - ValueSome 42 |> ValueOption.map (fun x -> x * 2) // evaluates to ValueSome 84 - - - - - iter f inp executes match inp with ValueNone -> () | ValueSome x -> f x. - - A function to apply to the voption value. - The input value option. - - - - ValueNone |> ValueOption.iter (printfn "%s") // does nothing - ValueSome "Hello world" |> ValueOption.iter (printfn "%s") // prints "Hello world" - - - - - Evaluates to true if is ValueSome and its value is equal to . - - The value to test for equality. - The input value option. - - True if the option is ValueSome and contains a value equal to , otherwise false. - - - - (99, ValueNone) ||> ValueOption.contains // evaluates to false - (99, ValueSome 99) ||> ValueOption.contains // evaluates to true - (99, ValueSome 100) ||> ValueOption.contains // evaluates to false - - - - - forall p inp evaluates to match inp with ValueNone -> true | ValueSome x -> p x. - - A function that evaluates to a boolean when given a value from the value option type. - The input value option. - - True if the option is None, otherwise it returns the result of applying the predicate - to the option value. - - - - ValueNone |> ValueOption.forall (fun x -> x >= 5) // evaluates to true - ValueSome 42 |> ValueOption.forall (fun x -> x >= 5) // evaluates to true - ValueSome 4 |> ValueOption.forall (fun x -> x >= 5) // evaluates to false - - - - - exists p inp evaluates to match inp with ValueNone -> false | ValueSome x -> p x. - - A function that evaluates to a boolean when given a value from the option type. - The input value option. - - False if the option is ValueNone, otherwise it returns the result of applying the predicate - to the option value. - - - - ValueNone |> ValueOption.exists (fun x -> x >= 5) // evaluates to false - ValueSome 42 |> ValueOption.exists (fun x -> x >= 5) // evaluates to true - ValueSome 4 |> ValueOption.exists (fun x -> x >= 5) // evaluates to false - - - - - fold f inp s evaluates to match inp with ValueNone -> s | ValueSome x -> f x s. - - A function to update the state data when given a value from a value option. - The input value option. - The initial state. - - The original state if the option is ValueNone, otherwise it returns the updated state with the folder - and the voption value. - - - - (ValueNone, 0) ||> ValueOption.foldBack (fun x accum -> accum + x * 2) // evaluates to 0 - (ValueSome 1, 0) ||> ValueOption.foldBack (fun x accum -> accum + x * 2) // evaluates to 2 - (ValueSome 1, 10) ||> ValueOption.foldBack (fun x accum -> accum + x * 2) // evaluates to 12 - - - - - fold f s inp evaluates to match inp with ValueNone -> s | ValueSome x -> f s x. - - A function to update the state data when given a value from a value option. - The initial state. - The input value option. - - The original state if the option is ValueNone, otherwise it returns the updated state with the folder - and the voption value. - - - - (0, ValueNone) ||> ValueOption.fold (fun accum x -> accum + x * 2) // evaluates to 0 - (0, ValueSome 1) ||> ValueOption.fold (fun accum x -> accum + x * 2) // evaluates to 2 - (10, ValueSome 1) ||> ValueOption.fold (fun accum x -> accum + x * 2) // evaluates to 12 - - - - - count inp evaluates to match inp with ValueNone -> 0 | ValueSome _ -> 1. - - The input value option. - - A zero if the option is ValueNone, a one otherwise. - - - - ValueNone |> ValueOption.count // evaluates to 0 - ValueSome 99 |> ValueOption.count // evaluates to 1 - - - - - Gets the value associated with the option. - - The input value option. - - The value within the option. - Thrown when the option is ValueNone. - - - - ValueSome 42 |> ValueOption.get // evaluates to 42 - (ValueNone: int ValueOption) |> ValueOption.get // throws exception! - - - - - Returns if it is Some, otherwise evaluates and returns the result. - - A thunk that provides an alternate value option when evaluated. - The input value option. - - The voption if the voption is ValueSome, else the result of evaluating . - is not evaluated unless is ValueNone. - - - - (ValueNone: int ValueOption) |> ValueOption.orElseWith (fun () -> ValueNone) // evaluates to ValueNone - ValueNone |> ValueOption.orElseWith (fun () -> (ValueSome 99)) // evaluates to ValueSome 99 - ValueSome 42 |> ValueOption.orElseWith (fun () -> ValueNone) // evaluates to ValueSome 42 - ValueSome 42 |> ValueOption.orElseWith (fun () -> (ValueSome 99)) // evaluates to ValueSome 42 - - - - - Returns if it is Some, otherwise returns . - - The value to use if is None. - The input option. - - The option if the option is Some, else the alternate option. - - - - ((ValueNone: int ValueOption), ValueNone) ||> ValueOption.orElse // evaluates to ValueNone - (ValueSome 99, ValueNone) ||> ValueOption.orElse // evaluates to ValueSome 99 - (ValueNone, ValueSome 42) ||> ValueOption.orElse // evaluates to ValueSome 42 - (ValueSome 99, ValueSome 42) ||> ValueOption.orElse // evaluates to ValueSome 42 - - - - - Gets the value of the voption if the voption is ValueSome, otherwise evaluates and returns the result. - - A thunk that provides a default value when evaluated. - The input voption. - - The voption if the voption is ValueSome, else the result of evaluating . - is not evaluated unless is ValueNone. - - - - ValueNone |> ValueOption.defaultWith (fun () -> 99) // evaluates to 99 - ValueSome 42 |> ValueOption.defaultWith (fun () -> 99) // evaluates to 42 - - - - - Gets the value of the value option if the option is ValueSome, otherwise returns the specified default value. - - The specified default value. - The input voption. - - The voption if the voption is ValueSome, else the default value. - Identical to the built-in operator, except with the arguments swapped. - - - - (99, ValueNone) ||> ValueOption.defaultValue // evaluates to 99 - (99, ValueSome 42) ||> ValueOption.defaultValue // evaluates to 42 - - - - - Returns true if the value option is ValueNone. - - The input value option. - - True if the voption is ValueNone. - - - - ValueNone |> ValueOption.isNone // evaluates to true - ValueSome 42 |> ValueOption.isNone // evaluates to false - - - - - Returns true if the value option is not ValueNone. - - The input value option. - - True if the value option is not ValueNone. - - - - ValueNone |> ValueOption.isSome // evaluates to false - ValueSome 42 |> ValueOption.isSome // evaluates to true - - - - - Contains operations for working with value options. - - Options - - - Convert an option to a potentially null value. - - The input value. - - The result value, which is null if the input was None. - - - - (None: string option) |> Option.toObj // evaluates to null - Some "not a null string" |> Option.toObj // evaluates to "not a null string" - - - - - Convert a potentially null value to an option. - - The input value. - - The result option. - - - - (null: string) |> Option.ofObj // evaluates to None - "not a null string" |> Option.ofObj // evaluates to (Some "not a null string") - - - - - Convert a Nullable value to an option. - - The input nullable value. - - The result option. - - - - System.Nullable<int>() |> Option.ofNullable // evaluates to None - System.Nullable(42) |> Option.ofNullable // evaluates to Some 42 - - - - - Convert the option to a Nullable value. - - The input option. - - The result value. - - - - (None: int option) |> Option.toNullable // evaluates to new System.Nullable<int>() - Some 42 |> Option.toNullable // evaluates to new System.Nullable(42) - - - - - Convert the option to a list of length 0 or 1. - - The input option. - - The result list. - - - - (None: int option) |> Option.toList // evaluates to [] - Some 42 |> Option.toList // evaluates to [42] - - - - - Convert the option to an array of length 0 or 1. - - The input option. - - The result array. - - - - (None: int option) |> Option.toArray // evaluates to [||] - Some 42 |> Option.toArray // evaluates to [|42|] - - - - - filter f inp evaluates to match inp with None -> None | Some x -> if f x then Some x else None. - - A function that evaluates whether the value contained in the option should remain, or be filtered out. - The input option. - - The input if the predicate evaluates to true; otherwise, None. - - - - None |> Option.filter (fun x -> x >= 5) // evaluates to None - Some 42 |> Option.filter (fun x -> x >= 5) // evaluates to Some 42 - Some 4 |> Option.filter (fun x -> x >= 5) // evaluates to None - - - - - flatten inp evaluates to match inp with None -> None | Some x -> x - - The input option. - - The input value if the value is Some; otherwise, None. - - flatten is equivalent to bind id. - - - - (None: int option option) |> Option.flatten // evaluates to None - (Some ((None: int option))) |> Option.flatten // evaluates to None - (Some (Some 42)) |> Option.flatten // evaluates to Some 42 - - - - - bind f inp evaluates to match inp with None -> None | Some x -> f x - - A function that takes the value of type T from an option and transforms it into - an option containing a value of type U. - The input option. - - An option of the output type of the binder. - - - - let tryParse (input: string) = - match System.Int32.TryParse input with - | true, v -> Some v - | false, _ -> None - None |> Option.bind tryParse // evaluates to None - Some "42" |> Option.bind tryParse // evaluates to Some 42 - Some "Forty-two" |> Option.bind tryParse // evaluates to None - - - - - map f option1 option2 option3 evaluates to match option1, option2, option3 with Some x, Some y, Some z -> Some (f x y z) | _ -> None. - - A function to apply to the option values. - The first option. - The second option. - The third option. - - An option of the input values after applying the mapping function, or None if any input is None. - - - - (None, None, None) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to None - (Some 100, None, None) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to None - (None, Some 100, None) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to None - (None, None, Some 100) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to None - (Some 5, Some 100, Some 10) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to Some 115 - - - - - map f option1 option2 evaluates to match option1, option2 with Some x, Some y -> Some (f x y) | _ -> None. - - A function to apply to the option values. - The first option. - The second option. - - An option of the input values after applying the mapping function, or None if either input is None. - - - - (None, None) ||> Option.map2 (fun x y -> x + y) // evaluates to None - (Some 5, None) ||> Option.map2 (fun x y -> x + y) // evaluates to None - (None, Some 10) ||> Option.map2 (fun x y -> x + y) // evaluates to None - (Some 5, Some 10) ||> Option.map2 (fun x y -> x + y) // evaluates to Some 15 - - - - - map f inp evaluates to match inp with None -> None | Some x -> Some (f x). - - A function to apply to the option value. - The input option. - - An option of the input value after applying the mapping function, or None if the input is None. - - - - None |> Option.map (fun x -> x * 2) // evaluates to None - Some 42 |> Option.map (fun x -> x * 2) // evaluates to Some 84 - - - - - iter f inp executes match inp with None -> () | Some x -> f x. - - A function to apply to the option value. - The input option. - - - - None |> Option.iter (printfn "%s") // does nothing - Some "Hello world" |> Option.iter (printfn "%s") // prints "Hello world" - - - - - Evaluates to true if is Some and its value is equal to . - - The value to test for equality. - The input option. - - True if the option is Some and contains a value equal to , otherwise false. - - - - (99, None) ||> Option.contains // evaluates to false - (99, Some 99) ||> Option.contains // evaluates to true - (99, Some 100) ||> Option.contains // evaluates to false - - - - - forall p inp evaluates to match inp with None -> true | Some x -> p x. - - A function that evaluates to a boolean when given a value from the option type. - The input option. - - True if the option is None, otherwise it returns the result of applying the predicate - to the option value. - - - - None |> Option.forall (fun x -> x >= 5) // evaluates to true - Some 42 |> Option.forall (fun x -> x >= 5) // evaluates to true - Some 4 |> Option.forall (fun x -> x >= 5) // evaluates to false - - - - - exists p inp evaluates to match inp with None -> false | Some x -> p x. - - A function that evaluates to a boolean when given a value from the option type. - The input option. - - False if the option is None, otherwise it returns the result of applying the predicate - to the option value. - - - - None |> Option.exists (fun x -> x >= 5) // evaluates to false - Some 42 |> Option.exists (fun x -> x >= 5) // evaluates to true - Some 4 |> Option.exists (fun x -> x >= 5) // evaluates to false - - - - - fold f inp s evaluates to match inp with None -> s | Some x -> f x s. - - A function to update the state data when given a value from an option. - The input option. - The initial state. - - The original state if the option is None, otherwise it returns the updated state with the folder - and the option value. - - - - (None, 0) ||> Option.foldBack (fun x accum -> accum + x * 2) // evaluates to 0 - (Some 1, 0) ||> Option.foldBack (fun x accum -> accum + x * 2) // evaluates to 2 - (Some 1, 10) ||> Option.foldBack (fun x accum -> accum + x * 2) // evaluates to 12 - - - - - fold f s inp evaluates to match inp with None -> s | Some x -> f s x. - - A function to update the state data when given a value from an option. - The initial state. - The input option. - - The original state if the option is None, otherwise it returns the updated state with the folder - and the option value. - - - - (0, None) ||> Option.fold (fun accum x -> accum + x * 2) // evaluates to 0 - (0, Some 1) ||> Option.fold (fun accum x -> accum + x * 2) // evaluates to 2 - (10, Some 1) ||> Option.fold (fun accum x -> accum + x * 2) // evaluates to 12 - - - - - count inp evaluates to match inp with None -> 0 | Some _ -> 1. - - The input option. - - A zero if the option is None, a one otherwise. - - - - None |> Option.count // evaluates to 0 - Some 99 |> Option.count // evaluates to 1 - - - - - Gets the value associated with the option. - - The input option. - - The value within the option. - - Thrown when the option is None. - - - - Some 42 |> Option.get // evaluates to 42 - (None: int option) |> Option.get // throws exception! - - - - - Returns if it is Some, otherwise evaluates and returns the result. - - A thunk that provides an alternate option when evaluated. - The input option. - - The option if the option is Some, else the result of evaluating . - is not evaluated unless is None. - - - - (None: int Option) |> Option.orElseWith (fun () -> None) // evaluates to None - None |> Option.orElseWith (fun () -> (Some 99)) // evaluates to Some 99 - Some 42 |> Option.orElseWith (fun () -> None) // evaluates to Some 42 - Some 42 |> Option.orElseWith (fun () -> (Some 99)) // evaluates to Some 42 - - - - - Returns if it is Some, otherwise returns . - - The value to use if is None. - The input option. - - The option if the option is Some, else the alternate option. - - - - ((None: int Option), None) ||> Option.orElse // evaluates to None - (Some 99, None) ||> Option.orElse // evaluates to Some 99 - (None, Some 42) ||> Option.orElse // evaluates to Some 42 - (Some 99, Some 42) ||> Option.orElse // evaluates to Some 42 - - - - - Gets the value of the option if the option is Some, otherwise evaluates and returns the result. - - A thunk that provides a default value when evaluated. - The input option. - - The option if the option is Some, else the result of evaluating . - is not evaluated unless is None. - - - - None |> Option.defaultWith (fun () -> 99) // evaluates to 99 - Some 42 |> Option.defaultWith (fun () -> 99) // evaluates to 42 - - - - - Gets the value of the option if the option is Some, otherwise returns the specified default value. - - The specified default value. - The input option. - - The option if the option is Some, else the default value. - - Identical to the built-in operator, except with the arguments swapped. - - - - (99, None) ||> Option.defaultValue // evaluates to 99 - (99, Some 42) ||> Option.defaultValue // evaluates to 42 - - - - - Returns true if the option is None. - - The input option. - - True if the option is None. - - - - None |> Option.isNone // evaluates to true - Some 42 |> Option.isNone // evaluates to false - - - - - Returns true if the option is not None. - The input option. - - True if the option is not None. - - - - None |> Option.isSome // evaluates to false - Some 42 |> Option.isSome // evaluates to true - - - - - Contains operations for working with options. - - Options - - - Convert the result to an Option value. - - The input result. - - The result value. - - - - Error 42 |> Result.toOption // evaluates to ValueNone - Ok 42 |> Result.toOption // evaluates to ValueSome 42 - - - - - Convert the result to an Option value. - - The input result. - - The option value. - - - - Error 42 |> Result.toOption // evaluates to None - Ok 42 |> Result.toOption // evaluates to Some 42 - - - - - Convert the result to a list of length 0 or 1. - - The input result. - - The result list. - - - - Error 42 |> Result.toList // evaluates to [] - Ok 42 |> Result.toList // evaluates to [ 42 ] - - - - - Convert the result to an array of length 0 or 1. - - The input result. - - The result array. - - - - Error 42 |> Result.toArray // evaluates to [||] - Ok 42 |> Result.toArray // evaluates to [| 42 |] - - - - - iter f inp executes match inp with Error _ -> () | Ok x -> f x. - - A function to apply to the result value. - The input result. - - - - Error "Hello world" |> Result.iter (printfn "%s") // does nothing - Ok "Hello world" |> Result.iter (printfn "%s") // prints "Hello world" - - - - - Evaluates to true if is Ok and its value is equal to . - - The value to test for equality. - The input result. - - True if the result is Ok and contains a value equal to , otherwise false. - - - - (99, Error 99) ||> Result.contains // evaluates to false - (99, Ok 99) ||> Result.contains // evaluates to true - (99, Ok 100) ||> Result.contains // evaluates to false - - - - - forall p inp evaluates to match inp with Error _ -> true | Ok x -> p x. - - A function that evaluates to a boolean when given a value from the result type. - The input result. - - True if the result is Error, otherwise it returns the result of applying the predicate - to the result value. - - - - Error 1 |> Result.forall (fun x -> x >= 5) // evaluates to true - Ok 42 |> Result.forall (fun x -> x >= 5) // evaluates to true - Ok 4 |> Result.forall (fun x -> x >= 5) // evaluates to false - - - - - exists p inp evaluates to match inp with Error _ -> false | Ok x -> p x. - - A function that evaluates to a boolean when given a value from the result type. - The input result. - - False if the result is Error, otherwise it returns the result of applying the predicate - to the result value. - - - - Error 6 |> Result.exists (fun x -> x >= 5) // evaluates to false - Ok 42 |> Result.exists (fun x -> x >= 5) // evaluates to true - Ok 4 |> Result.exists (fun x -> x >= 5) // evaluates to false - - - - - fold f inp s evaluates to match inp with Error _ -> s | Ok x -> f x s. - - A function to update the state data when given a value from an result. - The input result. - The initial state. - - The original state if the result is Error, otherwise it returns the updated state with the folder - and the result value. - - - - (Error 2, 0) ||> Result.foldBack (fun x accum -> accum + x * 2) // evaluates to 0 - (Ok 1, 0) ||> Result.foldBack (fun x accum -> accum + x * 2) // evaluates to 2 - (Ok 1, 10) ||> Result.foldBack (fun x accum -> accum + x * 2) // evaluates to 12 - - - - - fold f s inp evaluates to match inp with Error _ -> s | Ok x -> f s x. - - A function to update the state data when given a value from an result. - The initial state. - The input result. - - The original state if the result is Error, otherwise it returns the updated state with the folder - and the result value. - - - - (0, Error 2) ||> Result.fold (fun accum x -> accum + x * 2) // evaluates to 0 - (0, Ok 1) ||> Result.fold (fun accum x -> accum + x * 2) // evaluates to 2 - (10, Ok 1) ||> Result.fold (fun accum x -> accum + x * 2) // evaluates to 12 - - - - - count inp evaluates to match inp with Error _ -> 0 | Ok _ -> 1. - - The input result. - - A zero if the result is Error, a one otherwise. - - - - Error 99 |> Result.count // evaluates to 0 - Ok 99 |> Result.count // evaluates to 1 - - - - - Gets the value of the result if the result is Ok, otherwise evaluates and returns the result. - - A thunk that provides a default value when evaluated. - The input result. - - The result if the result is Ok, else the result of evaluating . - is not evaluated unless is Error. - - - - Ok 1 |> Result.defaultWith (fun error -> 99) // evaluates to 1 - Error 2 |> Result.defaultWith (fun error -> 99) // evaluates to 99 - - - - - Gets the value of the result if the result is Ok, otherwise returns the specified default value. - - The specified default value. - The input result. - - The result if the result is Ok, else the default value. - - - - Result.defaultValue 2 (Error 3) // evaluates to 2 - Result.defaultValue 2 (Ok 1) // evaluates to 1 - - - - - Returns true if the result is Error. - - The input result. - - True if the result is Error. - - - - Ok 42 |> Result.isError // evaluates to false - Error 42 |> Result.isError // evaluates to true - - - - - Returns true if the result is Ok. - The input result. - - True if the result is OK. - - - - Ok 42 |> Result.isOk // evaluates to true - Error 42 |> Result.isOk // evaluates to false - - - - - bind f inp evaluates to match inp with Error e -> Error e | Ok x -> f x - - A function that takes the value of type T from a result and transforms it into - a result containing a value of type U. - The input result. - - A result of the output type of the binder. - - - - let tryParse (input: string) = - match System.Int32.TryParse input with - | true, v -> Ok v - | false, _ -> Error "couldn't parse" - - Error "message" |> Result.bind tryParse // evaluates to Error "message" - - Ok "42" |> Result.bind tryParse // evaluates to Ok 42 - - Ok "Forty-two" |> Result.bind tryParse // evaluates to Error "couldn't parse" - - - - - map f inp evaluates to match inp with Error x -> Error (f x) | Ok v -> Ok v. - - A function to apply to the Error result value. - The input result. - - A result of the error value after applying the mapping function, or Ok if the input is Ok. - - - - Ok 1 |> Result.mapError (fun x -> "bar") // evaluates to Ok 1 - - Error "foo" |> Result.mapError (fun x -> "bar") // evaluates to Error "bar" - - - - - map f inp evaluates to match inp with Error e -> Error e | Ok x -> Ok (f x). - - A function to apply to the OK result value. - The input result. - - A result of the input value after applying the mapping function, or Error if the input is Error. - - - - Ok 1 |> Result.map (fun x -> "perfect") // evaluates to Ok "perfect" - - Error "message" |> Result.map (fun x -> "perfect") // evaluates to Error "message" - - - - - Contains operations for working with values of type . - - Choices and Results - - - Returns a string by concatenating count instances of str. - - The number of copies of the input string will be copied. - The input string. - - The concatenated string. - Thrown when count is negative. - - - - "Do it!" |> String.replicate 3 - - Evaluates to "Do it!Do it!Do it!". - - - - Builds a new string whose characters are the results of applying the function mapping - to each character and index of the input string. - - The function to apply to each character and index of the string. - The input string. - - The resulting string. - - - - input |> String.mapi (fun i c -> (i, c)) - - Evaluates to [ (0, 'O'); (1, 'K'); (2, '!') ]. - - - - Builds a new string whose characters are the results of applying the function mapping - to each of the characters of the input string. - - The function to apply to the characters of the string. - The input string. - - The resulting string. - - Changing case to upper for all characters in the input string - - open System - - let input = "Hello there!" - - input |> String.map Char.ToUpper // evaluates "HELLO THERE!" - - - - - Returns the length of the string. - - The input string. - - The number of characters in the string. - - Getting the length of different strings - - String.length null // evaluates 0 - String.length "" // evaluates 0 - String.length "123" // evaluates 3 - - - - - Applies the function action to the index of each character in the string and the - character itself. - - The function to apply to each character and index of the string. - The input string. - - Numbering the characters and printing the associated ASCII code - for each characater in the input string - - let input = "Hello" - input |> String.iteri (fun i c -> printfn "%d. %c %d" (i + 1) c (int c)) - - The sample evaluates as unit, but prints: - - 1. H 72 - 2. e 101 - 3. l 108 - 4. l 108 - 5. o 111 - - - - - Applies the function action to each character in the string. - - The function to be applied to each character of the string. - The input string. - - Printing the ASCII code for each characater in the string - - let input = "Hello" - input |> String.iter (fun c -> printfn "%c %d" c (int c)) - - The sample evaluates as unit, but prints: - - H 72 - e 101 - l 108 - l 108 - o 111 - - - - - Builds 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. - - The number of strings to initialize. - The function to take an index and produce a string to - be concatenated with the others. - - The constructed string. - - Thrown when count is negative. - - Enumerate digits ASCII codes - - String.init 10 (fun i -> int '0' + i |> sprintf "%d ") - - The sample evaluates to: "48 49 50 51 52 53 54 55 56 57 " - - - - Tests if all characters in the string satisfy the given predicate. - - The function to test each character of the string. - The input string. - - True if all characters return true for the predicate and false otherwise. - - Looking for lowercase characters - - open System - - "all are lower" |> String.forall Char.IsLower // evaluates false - - "allarelower" |> String.forall Char.IsLower // evaluates true - - - - - Builds a new string containing only the characters of the input string - for which the given predicate returns "true". - - Returns an empty string if the input string is null - - A function to test whether each character in the input sequence should be included in the output string. - The input string. - - The resulting string. - - Filtering out just alphanumeric characters - - open System - - let input = "0 1 2 3 4 5 6 7 8 9 a A m M" - - input |> String.filter Uri.IsHexDigit // evaluates "123456789aA" - - - Filtering out just digits - - open System - - "hello" |> String.filter Char.IsDigit // evaluates "" - - - - - Tests if any character of the string satisfies the given predicate. - - The function to test each character of the string. - The input string. - - True if any character returns true for the predicate and false otherwise. - - Looking for uppercase characters - - open System - - "Yoda" |> String.exists Char.IsUpper // evaluates true - - "nope" |> String.exists Char.IsUpper // evaluates false - - - - - Returns a new string made by concatenating the given strings - with separator sep, that is a1 + sep + ... + sep + aN. - The separator string to be inserted between the strings - of the input sequence. - The sequence of strings to be concatenated. - - A new string consisting of the concatenated strings separated by - the separation string. - Thrown when strings is null. - - - - let input1 = ["Stefan"; "says:"; "Hello"; "there!"] - - input1 |> String.concat " " // evaluates "Stefan says: Hello there!" - - let input2 = [0..9] |> List.map string - - input2 |> String.concat "" // evaluates "0123456789" - input2 |> String.concat ", " // evaluates "0, 1, 2, 3, 4, 5, 6, 7, 8, 9" - - let input3 = ["No comma"] - - input3 |> String.concat "," // evaluates "No comma" - - - - - Builds 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. - - The function to produce a string from each character of the input string. - The input string. - - The concatenated string. - - The following samples shows how to interspace spaces in a text - - let input = "Stefan says: Hi!" - - input |> String.collect (sprintf "%c ") - - The sample evaluates to "S t e f a n s a y s : H i ! " - - - How to show the ASCII representation of a very secret text - - "Secret" |> String.collect (fun chr -> int chr |> sprintf "%d ") - - The sample evaluates to "83 101 99 114 101 116 " - - - - 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. - - - Strings and Text - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - Language Primitives - - - Represents a statically-analyzed format associated with writing to a . The type parameter indicates the - arguments and return type of the format operation. - - - 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 associated with writing to a . The type parameter indicates the - arguments and return type of the format operation. - - - Represents a statically-analyzed format associated with writing to a . 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 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 . The first type parameter indicates the - arguments of the format operation and the last the overall return type. - - - Print to a string buffer and raise an exception with the given - result. Helper printers must return strings. - - The input formatter. - - The arguments of the formatter. - - - - failwithf "That's wrong. Five = %d and six = %d" (3+2) (3+3) - - Throws Exception with message "That's wrong. Five = 5 and six = 6". - - - - sprintf, but call the given 'final' function to generate the result. - See kprintf. - - The function called to generate a result from the formatted string. - The input formatter. - - The arguments of the formatter. - - Using % format patterns: - - open Printf - - ksprintf (fun s -> s + ", done!") $"Write three = {1+2}" - - Evaluates to "Write three = 3, done!". - - - - 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. - - The function called after formatting to generate the format result. - The input formatter. - - The arguments of the formatter. - - Using % format patterns: - - open Printf - - kprintf (fun s -> s + ", done!") $"Write three = {1+2}" - - Evaluates to "Write three = 3, done!". - - - - fprintf, but call the given 'final' function to generate the result. - See kprintf. - - The function called after formatting to generate the format result. - The input TextWriter. - The input formatter. - - The arguments of the formatter. - - Using % format patterns: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - kfprintf (fun () -> file.Close()) file $"Write three = {1+2}" - - Writes "Write three = 3" to out.txt. - - - - bprintf, but call the given 'final' function to generate the result. - See kprintf. - - The function called after formatting to generate the format result. - The input StringBuilder. - The input formatter. - - The arguments of the formatter. - - Using % format patterns: - - open Printf - open System.Text - - let buffer = new StringBuilder() - - kbprintf (fun () -> buffer.ToString()) buffer "Write five = %d" (3+2) - - Evaluates to "Write five = 5". - - - - Print to a string via an internal string buffer and return - the result as a string. Helper printers must return strings. - - The input formatter. - - The formatted string. - - - - sprintf "Write five = %d and six = %d" (3+2) (3+3) - - Evaluates to "Write five = 5 and six = 6". - - - - Formatted printing to stdout, adding a newline. - - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - printfn $"Write three = {1+2}" - printfn $"Write four = {2+2}" - - After evaluation the two lines are written to stdout. - - - Using % format patterns: - - printfn "Write five = %d" (3+2) - printfn "Write six = %d" (3+3) - - After evaluation the two lines are written to stdout. - - - - Formatted printing to stdout - - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - printf $"Write three = {1+2}" - - After evaluation the text "Write three = 3" is written to stdout. - - - Using % format patterns: - - printf "Write five = %d" (3+2) - - After evaluation the text "Write five = 5" is written to stdout. - - - - Formatted printing to stderr, adding a newline - - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - eprintfn $"Write three = {1+2}" - eprintfn $"Write four = {2+2}" - - After evaluation two lines are written to stderr. - - - Using % format patterns: - - eprintfn "Write five = %d" (3+2) - eprintfn "Write six = %d" (3+3) - - After evaluation two lines are written to stderr. - - - - Formatted printing to stderr - - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - eprintf $"Write three = {1+2}" - - After evaluation the text "Write three = 3" is written to stderr. - - - Using % format patterns: - - eprintf "Write five = %d" (3+2) - - After evaluation the text "Write five = 5" is written to stderr. - - - - Print to a text writer, adding a newline - - The TextWriter to print to. - The input formatter. - - The return type and arguments of the formatter. - - - Using interpolated strings: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - fprintfn file $"Write three = {1+2}" - fprintfn file $"Write four = {2+2}" - file.Close() - - After evaluation the file contains two lines. - - - Using % format patterns: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - fprintfn file "Write five = %d" (3+2) - fprintfn file "Write six = %d" (3+3) - file.Close() - - After evaluation the file contains two lines. - - - - Print to a text writer. - - The TextWriter to print to. - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - fprintf file $"Write three = {1+2}" - file.Close() - - After evaluation the file contains the text "Write three = 3". - - - Using % format patterns: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - fprintf file "Write five = %d" (3+2) - file.Close() - - After evaluation the file contains the text "Write five = 5". - - - - Print to a - - The StringBuilder to print to. - The input format or interpolated string. - - The return type and arguments of the formatter. - - Using interpolated strings: - - open Printf - open System.Text - - let buffer = new StringBuilder() - - bprintf buffer $"Write three = {1+2}" - buffer.ToString() - - Evaluates to "Write three = 3". - - - Using % format patterns: - - open Printf - open System.Text - - let buffer = new StringBuilder() - - bprintf buffer "Write five = %d" (3+2) - buffer.ToString() - - Evaluates to "Write five = 5". - - - - 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]. - - Strings and Text - - - - Return the resulting list - - - - - Add multiple elements to the collector and return the resulting array - - - - - Add multiple elements to the collector - - - - - Add an element to the collector - - - - - Collects elements and builds an array - - - - - Return the resulting list - - - - - Add multiple elements to the collector and return the resulting list - - - - - Add multiple elements to the collector - - - - - Add an element to the collector - - - - - Collects elements and builds a list - - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - A new enumerator for the sequence. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - A reference to the sequence. - - A 0, 1, and 2 respectively indicate Stop, Yield, and Goto conditions for the sequence generator. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - A new sequence generator for the expression. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - - Creates an instance of the attribute - NoEagerConstraintApplicationAttribute - - - Adding this attribute to the method adjusts the processing of some generic methods - during overload resolution. - - During overload resolution, caller arguments are matched with called arguments - to extract type information. By default, when the caller argument type is unconstrained (for example - a simple value x without known type information), and a method qualifies for - lambda constraint propagation, then member trait constraints from a method overload - are eagerly applied to the caller argument type. This causes that overload to be preferred, - regardless of other method overload resolution rules. Using this attribute suppresses this behaviour. - - - - Consider the following overloads: - - type OverloadsWithSrtp() = - [<NoEagerConstraintApplicationAttribute>] - static member inline SomeMethod< ^T when ^T : (member Number: int) > (x: ^T, f: ^T -> int) = 1 - static member SomeMethod(x: 'T list, f: 'T list -> int) = 2 - - let inline f x = - OverloadsWithSrtp.SomeMethod (x, (fun a -> 1)) - - With the attribute, the overload resolution fails, because both members are applicable. - Without the attribute, the overload resolution succeeds, because the member constraint is - eagerly applied, making the second member non-applicable. - - Attributes - - - - Defines the implementation of the code run after the creation of a struct state machine. - - - - - Defines the implementation of the SetStateMachine method for a struct state machine. - - - - - Defines the implementation of the MoveNext method for a struct state machine. - - - - - A special compiler-recognised delegate type for specifying blocks of resumable code - with access to the state machine. - - - - - Represents the runtime continuation of a resumable state machine created dynamically - - - - - The continuation of the state machine - - - - - Additional data associated with the state machine - - - - - The continuation of the state machine - - - - - Additional data associated with the state machine - - - - - Executes the SetStateMachine implementation of the state machine - - - - - Executes the MoveNext implementation of the state machine - - - - - Create dynamic information for a state machine - - - - - Represents the delegated runtime continuation of a resumable state machine created dynamically - - - - - Copy-out or copy-in the data of the state machine - - - - - Get the resumption point of the state machine - - - - - Copy-out or copy-in the data of the state machine - - - - Represents the delegated runtime continuation for a resumable state machine created dynamically - This field is removed from state machines generated using '__stateMachine'. Resumable code - used in state machines which accesses this field will raise a runtime exception. - - - - When statically compiled, holds the continuation goto-label further execution of the state machine - - - - - When statically compiled, holds the data for the state machine - - - - - Acts as a template for struct state machines introduced by __stateMachine, and also as a reflective implementation - - - - - Get the static parameters for a provided method. - - - A method returned by GetMethod on a provided type - - The static parameters of the provided method, if any - - - - Apply static arguments to a provided method that accepts static arguments. - - The provider must return a provided method with the given mangled name. - the provided method definition which has static parameters - the full name of the method that must be returned, including encoded representations of static parameters - the values of the static parameters, indexed by name - - The provided method definition corresponding to the given static parameter values - - - - Represents additional, optional information for a type provider component - - - - - Triggered when an assumption changes that invalidates the resolutions so far reported by the provider - - - - - Triggered when an assumption changes that invalidates the resolutions so far reported by the provider - - - - - Triggered when an assumption changes that invalidates the resolutions so far reported by the provider - - - - - Get the static parameters for a provided type. - - - A type returned by GetTypes or ResolveTypeName - - - - - - Gets the namespaces provided by the type provider. - - - - - Called by the compiler to ask for an Expression tree to replace the given MethodBase with. - - - MethodBase that was given to the compiler by a type returned by a GetType(s) call. - Expressions that represent the parameters to this call. - - An expression that the compiler will use in place of the given method base. - - - - Get the physical contents of the given logical provided assembly. - - - - - Apply static arguments to a provided type that accepts static arguments. - - - The provider must return a type with the given mangled name. - - the provided type definition which has static parameters - the full path of the type, including encoded representations of static parameters - the static parameters, indexed by name - - - - - - Represents an instantiation of a type provider component. - - - - - Namespace name the provider injects types into. - - - - - Compilers call this method to query a type provider for a type name. - - Resolver should return a type called name in namespace NamespaceName or null if the type is unknown. - - - - - - The top-level types - - - - - - The sub-namespaces in this namespace. An optional member to prevent generation of namespaces until an outer namespace is explored. - - - - - Represents a namespace provided by a type provider component. - - - - - Get the full path to use for temporary files for the type provider instance. - - - - - version of referenced system runtime assembly - - - - - Get the full path to referenced assembly that caused this type provider instance to be created. - - - - - Get the full path to use to resolve relative paths in any file name arguments given to the type provider instance. - - - - - Get the referenced assemblies for the type provider instance. - - - - - Indicates if the type provider host responds to invalidation events for type provider instances. - - - - - Indicates if the type provider instance is used in an environment which executes provided code such as F# Interactive. - - - - - Get the full path to use for temporary files for the type provider instance. - - - - - version of referenced system runtime assembly - - - - - Get the full path to referenced assembly that caused this type provider instance to be created. - - - - - Get the full path to use to resolve relative paths in any file name arguments given to the type provider instance. - - - - - Get the referenced assemblies for the type provider instance. - - - - - Indicates if the type provider host responds to invalidation events for type provider instances. - - - - - Indicates if the type provider instance is used in an environment which executes provided code such as F# Interactive. - - - - - Checks if given type exists in target system runtime library - - - - - Create a configuration which calls the given functions for the corresponding operation. - - - - - Create a configuration which calls the given function for the corresponding operation. - - - - - If the class that implements ITypeProvider has a constructor that accepts TypeProviderConfig - then it will be constructed with an instance of TypeProviderConfig. - - - - Creates an instance of the attribute - TypeProviderEditorHideMethodsAttribute - - - Indicates that a code editor should hide all System.Object methods from the intellisense menus for instances of a provided type - - - Gets or sets the line for the location. - - - Gets or sets the file path for the definition location. - - - Gets or sets the column for the location. - - - Gets or sets the line for the location. - - - Gets or sets the file path for the definition location. - - - Gets or sets the column for the location. - - - A type provider may provide an instance of this attribute to indicate the definition location for a provided type or member. - - - Gets the comment text. - - - Creates an instance of the attribute - TypeProviderXmlDocAttribute - - - A type provider may provide an instance of this attribute to indicate the documentation to show for - a provided type or member. - - - Gets the assembly name. - - - Creates an instance of the attribute - TypeProviderAssemblyAttribute - The name of the design-time assembly for this type provider. - - - Creates an instance of the attribute - TypeProviderAssemblyAttribute - - - Place this attribute on a runtime assembly to indicate that there is a corresponding design-time - assembly that contains a type provider. Runtime and design-time assembly may be the same. - - - Additional type attribute flags related to provided types - - - Creates an instance of the attribute - TypeProviderAttribute - - - Place on a class that implements ITypeProvider to extend the compiler - - - Represents the '1' measure expression when returned as a generic argument of a provided type. - - - Represents the inverse of a measure expressions when returned as a generic argument of a provided type. - - - Represents the product of two measure expressions when returned as a generic argument of a provided type. - - - Library functionality for supporting type providers and code generated by the F# compiler. See - also F# Type Providers in the F# Language Guide. - - - - Creates an anonymous event with the given handlers. - - A function to handle adding a delegate for the event to trigger. - A function to handle removing a delegate that the event triggers. - A function to produce the delegate type the event can trigger. - - The initialized event. - - - The F# compiler emits calls to this function to implement the use operator for F# sequence - expressions. - - The resource to be used and disposed. - The input sequence. - - The result sequence. - - - The F# compiler emits calls to this function to implement the compiler-intrinsic - conversions from untyped IEnumerable sequences to typed sequences. - - An initializer function. - A function to iterate and test if end of sequence is reached. - A function to retrieve the current element. - - The resulting typed sequence. - - - The F# compiler emits calls to this function to - implement the try/with operator for F# sequence expressions. - - The input sequence. - Pattern matches after 'when' converted to return 1 - Pattern matches after 'when' with their actual execution code - - The result sequence. - - - The F# compiler emits calls to this function to - implement the try/finally operator for F# sequence expressions. - - The input sequence. - A computation to be included in an enumerator's Dispose method. - - The result sequence. - - - The F# compiler emits calls to this function to - implement the while operator for F# sequence expressions. - - A function that indicates whether iteration should continue. - The input sequence. - - The result sequence. - - - A group of functions used as part of the compiled representation of F# sequence expressions. - - - - Statically generates a closure struct type based on ResumableStateMachine, - At runtime an instance of the new struct type is populated and 'afterMethod' is called - to consume it. - - - - At compile-time, the ResumableStateMachine type guides the generation of a new struct type by the F# compiler - with closure-capture fields in a way similar to an object expression. - Any mention of the ResumableStateMachine type in any the 'methods' is rewritten to this - fresh struct type. The 'methods' are used to implement the interfaces on ResumableStateMachine and are also rewritten. - The 'after' method is then executed and must eliminate the ResumableStateMachine. For example, - its return type must not include ResumableStateMachine. - - Gives the implementation of the MoveNext method on IAsyncStateMachine. - Gives the implementation of the SetStateMachine method on IAsyncStateMachine. - Gives code to execute after the generation of the state machine and to produce the final result. - - - - Indicates to jump to a resumption point within resumable code. - This may be the first statement in a MoveNextMethodImpl. - The integer must be a valid resumption point within this resumable code. - - - - - - Indicates a resumption point within resumable code - - - - - When used in a conditional, statically determines whether the 'then' branch - represents valid resumable code and provides an alternative implementation - if not. - - - - - Indicates a named debug point arising from the context of inlined code. - - - Only a limited range of debug point names are supported. - - If the debug point name is the empty string then the range used for the debug point will be - the range of the outermost expression prior to inlining. - - If the debug point name is ForLoop.InOrToKeyword and the code was ultimately - from a for .. in .. do or for .. = .. to .. do construct in a computation expression, - de-sugared to an inlined builder.For call, then the name "ForLoop.InOrToKeyword" can be used. - The range of the debug point will be precisely the range of the in or to keyword. - - If the name doesn't correspond to a known debug point arising from the original source context, then - an opt-in warning 3514 is emitted, and the range used for the debug point will be - the range of the root expression prior to inlining. - - - - - Contains compiler intrinsics related to the definition of state machines. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - Specifies resumable code which does nothing - - - - - Specifies resumable code which executes a loop - - - - - Specifies resumable code which executes with 'use' semantics - - - - - Specifies resumable code which executes with try/with semantics - - - - - Specifies resumable code which executes with try/finally semantics - - - - - Specifies resumable code which executes with try/finally semantics - - - - - Specifies resumable code which iterates yields - - - - - Specifies resumable code which iterates an input sequence - - - - - Creates resumable code whose definition is a delayed function - - - - - Sequences one section of resumable code after another - - - - - Contains functions for composing resumable code blocks - - - - Builds a query using query syntax and operators. - - - - let findEvensAndSortAndDouble(xs: System.Linq.IQueryable<int>) = - query { - for x in xs do - where (x % 2 = 0) - sortBy x - select (x+x) - } - - let data = [1; 2; 6; 7; 3; 6; 2; 1] - - findEvensAndSortAndDouble (data.AsQueryable()) |> Seq.toList - - Evaluates to [4; 4; 12; 12]. - - - - An active pattern to force the execution of values of type Lazy<_>. - - - - let f (Lazy v) = v + v - - let v = lazy (printf "eval!"; 5+5) - - f v - f v - - Evaluates to 10. The text eval! is printed once on the first invocation of f. - - - - Special prefix operator for splicing untyped expressions into quotation holes. - - - - let f v = <@@ (%%v: int) + (%%v: int) @@> - - f <@@ 5 + 5 @@>;; - - Evaluates to an untyped quotation equivalent to <@@ (5 + 5) + (5 + 5) @@> - - - - Special prefix operator for splicing typed expressions into quotation holes. - - - - let f v = <@ %v + %v @> - - f <@ 5 + 5 @>;; - - Evaluates to a quotation equivalent to <@ (5 + 5) + (5 + 5) @> - - - - Builds a 2D array from a sequence of sequences of elements. - - - - array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ] - - Evaluates to a 2x2 zero-based array with contents [[1.0; 2.0]; [3.0; 4.0]] - - - - Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. - - - - let table = readOnlyDict [ (1, 100); (2, 200) ] - - table[1] - - Evaluates to 100. - - - - - let table = readOnlyDict [ (1, 100); (2, 200) ] - - table[3] - - Throws System.Collections.Generic.KeyNotFoundException. - - - - Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. - - - - let table = dict [ (1, 100); (2, 200) ] - - table[1] - - Evaluates to 100. - - - - - let table = dict [ (1, 100); (2, 200) ] - - table[3] - - Throws System.Collections.Generic.KeyNotFoundException. - - - - 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. - - - - int8 -12 - - Evaluates to -12y. - - - - - int8 "3" - - Evaluates to 3y. - - - - 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. - - - - uint8 12 - - Evaluates to 12uy. - - - - 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. - - - - double 45 - - Evaluates to 45.0. - - - - - double 12.3f - - Evaluates to 12.30000019. - - - - 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. - - - - single 45 - - Evaluates to 45.0f. - - - - Builds an asynchronous workflow using computation expression syntax. - - - - let sleepExample() = - async { - printfn "sleeping" - do! Async.Sleep 10 - printfn "waking up" - return 6 - } - - sleepExample() |> Async.RunSynchronously - - - - - Builds a set from a sequence of objects. The objects are indexed using generic comparison. - - The input sequence of elements. - - The created set. - - - - let values = set [ 1; 2; 3; 5; 7; 11 ] - - Evaluates to a set containing the given numbers. - - - - Print to a file using the given format, and add a newline. - - The file TextWriter. - The formatter. - - The formatted result. - - See Printf.fprintfn (link: ) for examples. - - - Print to a file using the given format. - - The file TextWriter. - The formatter. - - The formatted result. - - See Printf.fprintf (link: ) for examples. - - - Print to a string buffer and raise an exception with the given - result. Helper printers must return strings. - - The formatter. - - The formatted result. - - See Printf.failwithf (link: ) for examples. - - - Print to a string using the given format. - - The formatter. - - The formatted result. - - See Printf.sprintf (link: ) for examples. - - - Print to stderr using the given format, and add a newline. - - The formatter. - - The formatted result. - - See Printf.eprintfn (link: ) for examples. - - - Print to stderr using the given format. - - The formatter. - - The formatted result. - - See Printf.eprintf (link: ) for examples. - - - Print to stdout using the given format, and add a newline. - - The formatter. - - The formatted result. - - See Printf.printfn (link: ) for examples. - - - Print to stdout using the given format. - - The formatter. - - The formatted result. - - See Printf.printf (link: ) for examples. - - - Converts the argument to signed byte. - This is a direct, checked 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. - - - - Checked.int8 -12 - - Evaluates to -12y. - - - - - Checked.int8 "129" - - Throws System.OverflowException. - - - - Converts the argument to byte. - This is a direct, checked 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. - - - - Checked.uint8 12 - - Evaluates to -12y. - - - - - Checked.uint8 -12 - - Throws System.OverflowException. - - - - A set of extra operators and functions. This module is automatically opened in all F# code. - - Basic Operators - - - diff --git a/lib/fcs/nojaf/Debug/FSharp.DependencyManager.Nuget.dll b/lib/fcs/nojaf/Debug/FSharp.DependencyManager.Nuget.dll deleted file mode 100644 index 2e9f5f519c..0000000000 Binary files a/lib/fcs/nojaf/Debug/FSharp.DependencyManager.Nuget.dll and /dev/null differ diff --git a/lib/fcs/nojaf/Debug/FSharp.DependencyManager.Nuget.xml b/lib/fcs/nojaf/Debug/FSharp.DependencyManager.Nuget.xml deleted file mode 100644 index 9d70483cee..0000000000 --- a/lib/fcs/nojaf/Debug/FSharp.DependencyManager.Nuget.xml +++ /dev/null @@ -1,160 +0,0 @@ - - -FSharp.DependencyManager.Nuget - - - - version - (Originally from FSDependencyManager.txt:7) - - - - - Unable to apply implicit argument number %d - (Originally from FSDependencyManager.txt:4) - - - - - Timed out resolving packages, process: '%s' '%s' - (Originally from FSDependencyManager.txt:10) - - - - - The source directory '%s' not found - (Originally from FSDependencyManager.txt:9) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - %s requires a value - (Originally from FSDependencyManager.txt:3) - - - - - Not used - (Originally from FSDependencyManager.txt:5) - - - - - Missing value for timeout - (Originally from FSDependencyManager.txt:12) - - - - - Load Nuget Package - (Originally from FSDependencyManager.txt:6) - - - - - Invalid value for timeout '%s', valid values: none, -1 and integer milliseconds to wait - (Originally from FSDependencyManager.txt:11) - - - - - with the highest version - (Originally from FSDependencyManager.txt:8) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - PackageManager can not reference the System Package '%s' - (Originally from FSDependencyManager.txt:2) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - %s for F# %s - (Originally from C:\Users\nojaf\Projects\fsharp\src\Compiler\Facilities\UtilsStrings.txt:2) - - - - - Microsoft (R) F# Compiler version %s - (Originally from C:\Users\nojaf\Projects\fsharp\src\Compiler\Facilities\UtilsStrings.txt:1) - - - - - The result of building the package resolution files. - - - - - Succeded? - - - - - The resolution output log - - - - - The resolution error log (process stderr) - - - - - The source code file paths - - - - - The roots to package directories - This points to the root of each located package. - The layout of the package manager will be package manager specific. - however, the dependency manager dll understands the nuget package layout - and so if the package contains folders similar to the nuget layout then - the dependency manager will be able to probe and resolve any native dependencies - required by the nuget package. - - This path is also equivant to - #I @"c:\somepath\to\packages\ResolvedPackage\1.1.1\" - - - - - The resolution paths - the full paths to selected resolved dll's. - In scripts this is equivalent to #r @"c:\somepath\to\packages\ResolvedPackage\1.1.1\lib\netstandard2.0\ResolvedAssembly.dll" - - - - - The results of ResolveDependencies - - - - - Return a string array delimited by commas - Note that a quoted string is not going to be mangled into pieces. - - - - diff --git a/lib/fcs/nojaf/Release/FSharp.Compiler.Service.deps.json b/lib/fcs/nojaf/Release/FSharp.Compiler.Service.deps.json deleted file mode 100644 index 9857f57116..0000000000 --- a/lib/fcs/nojaf/Release/FSharp.Compiler.Service.deps.json +++ /dev/null @@ -1,282 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETStandard,Version=v2.0/", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETStandard,Version=v2.0": {}, - ".NETStandard,Version=v2.0/": { - "FSharp.Compiler.Service/43.8.100": { - "dependencies": { - "FSharp.Core": "7.0.0", - "FSharp.DependencyManager.Nuget": "8.0.100", - "NETStandard.Library": "2.0.3", - "System.Buffers": "4.5.1", - "System.Collections.Immutable": "6.0.0", - "System.Diagnostics.DiagnosticSource": "6.0.0", - "System.Memory": "4.5.5", - "System.Reflection.Emit": "4.7.0", - "System.Reflection.Metadata": "6.0.1", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "FSharp.Compiler.Service.dll": {} - } - }, - "FSharp.Core/7.0.0": { - "runtime": { - "lib/netstandard2.0/FSharp.Core.dll": { - "assemblyVersion": "7.0.0.0", - "fileVersion": "7.0.22.57105" - } - }, - "resources": { - "lib/netstandard2.0/cs/FSharp.Core.resources.dll": { - "locale": "cs" - }, - "lib/netstandard2.0/de/FSharp.Core.resources.dll": { - "locale": "de" - }, - "lib/netstandard2.0/es/FSharp.Core.resources.dll": { - "locale": "es" - }, - "lib/netstandard2.0/fr/FSharp.Core.resources.dll": { - "locale": "fr" - }, - "lib/netstandard2.0/it/FSharp.Core.resources.dll": { - "locale": "it" - }, - "lib/netstandard2.0/ja/FSharp.Core.resources.dll": { - "locale": "ja" - }, - "lib/netstandard2.0/ko/FSharp.Core.resources.dll": { - "locale": "ko" - }, - "lib/netstandard2.0/pl/FSharp.Core.resources.dll": { - "locale": "pl" - }, - "lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll": { - "locale": "pt-BR" - }, - "lib/netstandard2.0/ru/FSharp.Core.resources.dll": { - "locale": "ru" - }, - "lib/netstandard2.0/tr/FSharp.Core.resources.dll": { - "locale": "tr" - }, - "lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll": { - "locale": "zh-Hans" - }, - "lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll": { - "locale": "zh-Hant" - } - } - }, - "Microsoft.NETCore.Platforms/1.1.0": {}, - "NETStandard.Library/2.0.3": { - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "System.Buffers/4.5.1": { - "runtime": { - "lib/netstandard2.0/System.Buffers.dll": { - "assemblyVersion": "4.0.3.0", - "fileVersion": "4.6.28619.1" - } - } - }, - "System.Collections.Immutable/6.0.0": { - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Collections.Immutable.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Diagnostics.DiagnosticSource/6.0.0": { - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Diagnostics.DiagnosticSource.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "System.Memory/4.5.5": { - "dependencies": { - "System.Buffers": "4.5.1", - "System.Numerics.Vectors": "4.4.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Memory.dll": { - "assemblyVersion": "4.0.1.2", - "fileVersion": "4.6.31308.1" - } - } - }, - "System.Numerics.Vectors/4.4.0": { - "runtime": { - "lib/netstandard2.0/System.Numerics.Vectors.dll": { - "assemblyVersion": "4.1.3.0", - "fileVersion": "4.6.25519.3" - } - } - }, - "System.Reflection.Emit/4.7.0": { - "dependencies": { - "System.Reflection.Emit.ILGeneration": "4.7.0" - }, - "runtime": { - "lib/netstandard2.0/System.Reflection.Emit.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.700.19.56404" - } - } - }, - "System.Reflection.Emit.ILGeneration/4.7.0": { - "runtime": { - "lib/netstandard2.0/System.Reflection.Emit.ILGeneration.dll": { - "assemblyVersion": "4.0.0.0", - "fileVersion": "4.700.19.56404" - } - } - }, - "System.Reflection.Metadata/6.0.1": { - "dependencies": { - "System.Collections.Immutable": "6.0.0" - }, - "runtime": { - "lib/netstandard2.0/System.Reflection.Metadata.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.322.12309" - } - } - }, - "System.Runtime.CompilerServices.Unsafe/6.0.0": { - "runtime": { - "lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll": { - "assemblyVersion": "6.0.0.0", - "fileVersion": "6.0.21.52210" - } - } - }, - "FSharp.DependencyManager.Nuget/8.0.100": { - "dependencies": { - "FSharp.Core": "7.0.0", - "System.Reflection.Emit": "4.7.0", - "System.Reflection.Metadata": "6.0.1", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - }, - "runtime": { - "FSharp.DependencyManager.Nuget.dll": {} - } - } - } - }, - "libraries": { - "FSharp.Compiler.Service/43.8.100": { - "type": "project", - "serviceable": false, - "sha512": "" - }, - "FSharp.Core/7.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-8hzwUheAViWMAHWQTr6kR/19C4LhjZ4TlftKfNeZO9y7XnRUzLTK6FJS1C+0oObuUe0e4KndYxjWE+Zgea9YXQ==", - "path": "fsharp.core/7.0.0", - "hashPath": "fsharp.core.7.0.0.nupkg.sha512" - }, - "Microsoft.NETCore.Platforms/1.1.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", - "path": "microsoft.netcore.platforms/1.1.0", - "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" - }, - "NETStandard.Library/2.0.3": { - "type": "package", - "serviceable": true, - "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "path": "netstandard.library/2.0.3", - "hashPath": "netstandard.library.2.0.3.nupkg.sha512" - }, - "System.Buffers/4.5.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==", - "path": "system.buffers/4.5.1", - "hashPath": "system.buffers.4.5.1.nupkg.sha512" - }, - "System.Collections.Immutable/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-l4zZJ1WU2hqpQQHXz1rvC3etVZN+2DLmQMO79FhOTZHMn8tDRr+WU287sbomD0BETlmKDn0ygUgVy9k5xkkJdA==", - "path": "system.collections.immutable/6.0.0", - "hashPath": "system.collections.immutable.6.0.0.nupkg.sha512" - }, - "System.Diagnostics.DiagnosticSource/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-frQDfv0rl209cKm1lnwTgFPzNigy2EKk1BS3uAvHvlBVKe5cymGyHO+Sj+NLv5VF/AhHsqPIUUwya5oV4CHMUw==", - "path": "system.diagnostics.diagnosticsource/6.0.0", - "hashPath": "system.diagnostics.diagnosticsource.6.0.0.nupkg.sha512" - }, - "System.Memory/4.5.5": { - "type": "package", - "serviceable": true, - "sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", - "path": "system.memory/4.5.5", - "hashPath": "system.memory.4.5.5.nupkg.sha512" - }, - "System.Numerics.Vectors/4.4.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ==", - "path": "system.numerics.vectors/4.4.0", - "hashPath": "system.numerics.vectors.4.4.0.nupkg.sha512" - }, - "System.Reflection.Emit/4.7.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-VR4kk8XLKebQ4MZuKuIni/7oh+QGFmZW3qORd1GvBq/8026OpW501SzT/oypwiQl4TvT8ErnReh/NzY9u+C6wQ==", - "path": "system.reflection.emit/4.7.0", - "hashPath": "system.reflection.emit.4.7.0.nupkg.sha512" - }, - "System.Reflection.Emit.ILGeneration/4.7.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-AucBYo3DSI0IDxdUjKksBcQJXPHyoPyrCXYURW1WDsLI4M65Ar/goSHjdnHOAY9MiYDNKqDlIgaYm+zL2hA1KA==", - "path": "system.reflection.emit.ilgeneration/4.7.0", - "hashPath": "system.reflection.emit.ilgeneration.4.7.0.nupkg.sha512" - }, - "System.Reflection.Metadata/6.0.1": { - "type": "package", - "serviceable": true, - "sha512": "sha512-III/lNMSn0ZRBuM9m5Cgbiho5j81u0FAEagFX5ta2DKbljZ3T0IpD8j+BIiHQPeKqJppWS9bGEp6JnKnWKze0g==", - "path": "system.reflection.metadata/6.0.1", - "hashPath": "system.reflection.metadata.6.0.1.nupkg.sha512" - }, - "System.Runtime.CompilerServices.Unsafe/6.0.0": { - "type": "package", - "serviceable": true, - "sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==", - "path": "system.runtime.compilerservices.unsafe/6.0.0", - "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" - }, - "FSharp.DependencyManager.Nuget/8.0.100": { - "type": "project", - "serviceable": false, - "sha512": "" - } - } -} \ No newline at end of file diff --git a/lib/fcs/nojaf/Release/FSharp.Compiler.Service.dll b/lib/fcs/nojaf/Release/FSharp.Compiler.Service.dll deleted file mode 100644 index 3741cdc29d..0000000000 Binary files a/lib/fcs/nojaf/Release/FSharp.Compiler.Service.dll and /dev/null differ diff --git a/lib/fcs/nojaf/Release/FSharp.Compiler.Service.xml b/lib/fcs/nojaf/Release/FSharp.Compiler.Service.xml deleted file mode 100644 index 91d82f3fc9..0000000000 --- a/lib/fcs/nojaf/Release/FSharp.Compiler.Service.xml +++ /dev/null @@ -1,38968 +0,0 @@ - - -FSharp.Compiler.Service - - - - Consider using 'yield!' instead of 'yield'. - (Originally from FSComp.txt:38) - - - - - This XML comment is invalid: unresolved cross-reference '%s' - (Originally from FSComp.txt:1642) - - - - - This XML comment is invalid: missing 'name' attribute for parameter or parameter reference - (Originally from FSComp.txt:1638) - - - - - This XML comment is incomplete: no documentation for parameter '%s' - (Originally from FSComp.txt:1643) - - - - - This XML comment is invalid: missing 'cref' attribute for cross-reference - (Originally from FSComp.txt:1639) - - - - - This XML comment is invalid: unknown parameter '%s' - (Originally from FSComp.txt:1640) - - - - - This XML comment is invalid: multiple documentation entries for parameter '%s' - (Originally from FSComp.txt:1641) - - - - - This XML comment is invalid: '%s' - (Originally from FSComp.txt:1637) - - - - - The byref pointer is readonly, so this write is not permitted. - (Originally from FSComp.txt:1499) - - - - - The value '%s' is not accessible from this code location - (Originally from FSComp.txt:974) - - - - - Use reference assemblies for .NET framework references when available (Enabled by default). - (Originally from FSComp.txt:1537) - - - - - This attribute is currently unsupported by the F# compiler. Applying it will not achieve its intended effect. - (Originally from FSComp.txt:42) - - - - - The union cases or fields of the type '%s' are not accessible from this code location - (Originally from FSComp.txt:973) - - - - - The union case '%s' is not accessible from this code location - (Originally from FSComp.txt:975) - - - - - The value or constructor '%s' is not defined. - (Originally from FSComp.txt:10) - - - - - The value, namespace, type or module '%s' is not defined. - (Originally from FSComp.txt:11) - - - - - The value, constructor, namespace or type '%s' is not defined. - (Originally from FSComp.txt:9) - - - - - The type parameter %s is not defined. - (Originally from FSComp.txt:18) - - - - - The type '%s' is not defined in '%s'. - (Originally from FSComp.txt:14) - - - - - The type '%s' is not defined. - (Originally from FSComp.txt:13) - - - - - Maybe you want one of the following: - (Originally from FSComp.txt:17) - - - - - The record label or namespace '%s' is not defined. - (Originally from FSComp.txt:15) - - - - - The record label '%s' is not defined. - (Originally from FSComp.txt:16) - - - - - The pattern discriminator '%s' is not defined. - (Originally from FSComp.txt:19) - - - - - The namespace or module '%s' is not defined. - (Originally from FSComp.txt:6) - - - - - The namespace '%s' is not defined. - (Originally from FSComp.txt:5) - - - - - The type '%s' does not define the field, constructor or member '%s'. - (Originally from FSComp.txt:8) - - - - - The field, constructor or member '%s' is not defined. - (Originally from FSComp.txt:7) - - - - - The constructor, module or namespace '%s' is not defined. - (Originally from FSComp.txt:12) - - - - - The type '%s' implements 'System.IComparable'. Consider also adding an explicit override for 'Object.Equals' - (Originally from FSComp.txt:180) - - - - - The type '%s' 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 - (Originally from FSComp.txt:181) - - - - - The signature and implementation are not compatible because the respective type parameter counts differ - (Originally from FSComp.txt:176) - - - - - The signature and implementation are not compatible because the type parameter '%s' has a constraint of the form %s but the implementation does not. Either remove this constraint from the signature or add it to the implementation. - (Originally from FSComp.txt:179) - - - - - The signature and implementation are not compatible because the declaration of the type parameter '%s' requires a constraint of the form %s - (Originally from FSComp.txt:178) - - - - - 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 - (Originally from FSComp.txt:177) - - - - - The override for '%s' was ambiguous - (Originally from FSComp.txt:196) - - - - - The override '%s' implements more than one abstract slot, e.g. '%s' and '%s' - (Originally from FSComp.txt:199) - - - - - No implementations of '%s' had the correct number of arguments and type parameters. The required signature is '%s'. - (Originally from FSComp.txt:195) - - - - - No implementation was given for '%s'. Note that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. - (Originally from FSComp.txt:206) - - - - - No implementation was given for those members: %sNote that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. - (Originally from FSComp.txt:207) - - - - - No implementation was given for those members (some results omitted): %sNote that all interface members must be implemented and listed under an appropriate 'interface' declaration, e.g. 'interface ... with member ...'. - (Originally from FSComp.txt:208) - - - - - No implementation was given for those members (some results omitted): %s - (Originally from FSComp.txt:205) - - - - - No implementation was given for those members: %s - (Originally from FSComp.txt:204) - - - - - No implementation was given for '%s' - (Originally from FSComp.txt:203) - - - - - A type has been implicitly inferred as 'obj', which may be unintended. Consider adding explicit type annotations. You can disable this warning by using '#nowarn \"3559\"' or '--nowarn:3559'. - (Originally from FSComp.txt:1703) - - - - - The interface '%s' is included in multiple explicitly implemented interface types. Add an explicit implementation of this interface. - (Originally from FSComp.txt:201) - - - - - The named argument '%s' has been assigned more than one value - (Originally from FSComp.txt:202) - - - - - More than one override implements '%s' - (Originally from FSComp.txt:197) - - - - - The namespace or module attributes differ between signature and implementation - (Originally from FSComp.txt:193) - - - - - The method '%s' is sealed and cannot be overridden - (Originally from FSComp.txt:198) - - - - - This method is over-constrained in its type parameters - (Originally from FSComp.txt:194) - - - - - The member '%s' matches multiple overloads of the same method.\nPlease restrict it to one of the following:%s. - (Originally from FSComp.txt:1392) - - - - - The member '%s' does not have the correct number of method type parameters. The required signature is '%s'. - (Originally from FSComp.txt:210) - - - - - The member '%s' does not have the correct number of arguments. The required signature is '%s'. - (Originally from FSComp.txt:209) - - - - - The member '%s' does not have the correct kinds of generic parameters. The required signature is '%s'. - (Originally from FSComp.txt:211) - - - - - The member '%s' cannot be used to implement '%s'. The required signature is '%s'. - (Originally from FSComp.txt:212) - - - - - Invalid value - (Originally from FSComp.txt:175) - - - - - You cannot implement the interface '%s' with the two instantiations '%s' and '%s' because they may unify. - (Originally from FSComp.txt:1596) - - - - - '%s' cannot implement the interface '%s' with the two instantiations '%s' and '%s' because they may unify. - (Originally from FSComp.txt:1595) - - - - - Interface member '%s' does not have a most specific implementation. - (Originally from FSComp.txt:1535) - - - - - The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode' or 'Object.Equals'. You must apply the 'CustomEquality' attribute to the type - (Originally from FSComp.txt:182) - - - - - The struct, record or union type '%s' has an explicit implementation of 'Object.GetHashCode'. Consider implementing a matching override for 'Object.Equals(obj)' - (Originally from FSComp.txt:183) - - - - - The struct, record or union type '%s' has an explicit implementation of 'Object.Equals'. Consider implementing a matching override for 'Object.GetHashCode()' - (Originally from FSComp.txt:184) - - - - - Duplicate or redundant interface - (Originally from FSComp.txt:200) - - - - - 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 - (Originally from FSComp.txt:171) - - - - - Could not resolve the ambiguity in the use of a generic construct with an 'unmanaged' constraint at or near this position - (Originally from FSComp.txt:1086) - - - - - Could not resolve the ambiguity inherent in the use of a 'printf'-style format string - (Originally from FSComp.txt:172) - - - - - Could not resolve the ambiguity in the use of a generic construct with an 'enum' constraint at or near this position - (Originally from FSComp.txt:173) - - - - - Could not resolve the ambiguity in the use of a generic construct with a 'delegate' constraint at or near this position - (Originally from FSComp.txt:174) - - - - - The type '%s' is not accessible from this code location - (Originally from FSComp.txt:972) - - - - - union case - (Originally from FSComp.txt:950) - - - - - property - (Originally from FSComp.txt:955) - - - - - patvar - (Originally from FSComp.txt:960) - - - - - and %d other overloads - (Originally from FSComp.txt:949) - - - - - namespace/module - (Originally from FSComp.txt:963) - - - - - namespace - (Originally from FSComp.txt:961) - - - - - module - (Originally from FSComp.txt:962) - - - - - generated type - (Originally from FSComp.txt:967) - - - - - generated property - (Originally from FSComp.txt:966) - - - - - Full name - (Originally from FSComp.txt:945) - - - - - also from %s - (Originally from FSComp.txt:965) - - - - - from %s - (Originally from FSComp.txt:964) - - - - - field - (Originally from FSComp.txt:953) - - - - - extension - (Originally from FSComp.txt:956) - - - - - event - (Originally from FSComp.txt:954) - - - - - custom operation - (Originally from FSComp.txt:957) - - - - - Calls - (Originally from FSComp.txt:1296) - - - - - argument - (Originally from FSComp.txt:958) - - - - - anonymous record field - (Originally from FSComp.txt:959) - - - - - active recognizer - (Originally from FSComp.txt:952) - - - - - active pattern result - (Originally from FSComp.txt:951) - - - - - \nA tuple type is required for one or more arguments. Consider wrapping the given arguments in additional parentheses or review the definition of the interface. - (Originally from FSComp.txt:39) - - - - - The specified .NET Framework version '%s' is not supported. Please specify a value from the enumeration Microsoft.Build.Utilities.TargetDotNetFrameworkVersion. - (Originally from FSComp.txt:1134) - - - - - Unexpected Expr.TyChoose - (Originally from FSComp.txt:982) - - - - - 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. - (Originally from FSComp.txt:983) - - - - - The 'VolatileField' attribute may only be used on 'let' bindings in classes - (Originally from FSComp.txt:677) - - - - - Volatile fields must be marked 'mutable' and cannot be thread-static - (Originally from FSComp.txt:732) - - - - - A declaration may only be given a value in a signature if the declaration has the [<Literal>] attribute - (Originally from FSComp.txt:730) - - - - - Declaring \"interfaces with static abstract methods\" is an advanced feature. See https://aka.ms/fsharp-iwsams for guidance. You can disable this warning by using '#nowarn \"3535\"' or '--nowarn:3535'. - (Originally from FSComp.txt:1685) - - - - - '%s' is normally used as a type constraint in generic code, e.g. \"'T when ISomeInterface<'T>\" or \"let f (x: #ISomeInterface<_>)\". See https://aka.ms/fsharp-iwsams for guidance. You can disable this warning by using '#nowarn \"3536\"' or '--nowarn:3536'. - (Originally from FSComp.txt:1686) - - - - - In sequence expressions, multiple results are generated using 'yield!' - (Originally from FSComp.txt:652) - - - - - 'use' expressions may not be used in queries - (Originally from FSComp.txt:1313) - - - - - The use of 'let! x = coll' in sequence expressions is not permitted. Use 'for x in coll' instead. - (Originally from FSComp.txt:650) - - - - - This declaration is not supported in recursive declaration groups - (Originally from FSComp.txt:1382) - - - - - This attribute cannot be used in this version of F# - (Originally from FSComp.txt:704) - - - - - This is not a known query operator. Query operators are identifiers such as 'select', 'where', 'sortBy', 'thenBy', 'groupBy', 'groupValBy', 'join', 'groupJoin', 'sumBy' and 'averageBy', defined using corresponding methods on the 'QueryBuilder' type. - (Originally from FSComp.txt:1316) - - - - - Arguments to query operators may require parentheses, e.g. 'where (x > y)' or 'groupBy (x.Length / 10)' - (Originally from FSComp.txt:1324) - - - - - Unrecognized attribute target. Valid attribute targets are 'assembly', 'module', 'type', 'method', 'property', 'return', 'param', 'field', 'event', 'constructor'. - (Originally from FSComp.txt:694) - - - - - The unnamed arguments do not form a prefix of the arguments of the method called - (Originally from FSComp.txt:671) - - - - - Unknown union case - (Originally from FSComp.txt:525) - - - - - Unit-of-measure cannot be used in type constructor application - (Originally from FSComp.txt:562) - - - - - This union case takes one argument - (Originally from FSComp.txt:580) - - - - - The union case named '%s' conflicts with the generated type '%s' - (Originally from FSComp.txt:1110) - - - - - Union case/exception field '%s' cannot be used more than once. - (Originally from FSComp.txt:1351) - - - - - This union case expects %d arguments in tupled form, but was given %d. The missing field arguments may be any of:%s - (Originally from FSComp.txt:581) - - - - - This union case does not take arguments - (Originally from FSComp.txt:579) - - - - - The union case '%s' does not have a field named '%s'. - (Originally from FSComp.txt:1347) - - - - - Uninitialized 'val' fields must be mutable and marked with the '[<DefaultValue>]' attribute. Consider using a 'let' binding instead of a 'val' field. - (Originally from FSComp.txt:733) - - - - - Unexpected type arguments - (Originally from FSComp.txt:571) - - - - - Unexpected %s in type expression - (Originally from FSComp.txt:565) - - - - - Unexpected / in type - (Originally from FSComp.txt:570) - - - - - Unexpected source-level property specification - (Originally from FSComp.txt:536) - - - - - Unexpected source-level property specification in syntax tree - (Originally from FSComp.txt:530) - - - - - Unexpected SynMeasure.Anon - (Originally from FSComp.txt:487) - - - - - Unexpected function type in union case field definition. If you intend the field to be a function, consider wrapping the function signature with parens, e.g. | Case of a -> b into | Case of (a -> b). - (Originally from FSComp.txt:1726) - - - - - Unexpected expression at recursive inference point - (Originally from FSComp.txt:515) - - - - - Unexpected Const_uint16array - (Originally from FSComp.txt:492) - - - - - Unexpected Const_bytearray - (Originally from FSComp.txt:493) - - - - - Unexpected condition in imported assembly: failed to decode AttributeUsage attribute - (Originally from FSComp.txt:693) - - - - - Unexpected big rational constant - (Originally from FSComp.txt:490) - - - - - The field '%s' has been given a value, but is not present in the type '%s' - (Originally from FSComp.txt:617) - - - - - Invalid interpolated string. %s - (Originally from FSComp.txt:1622) - - - - - Unable to parse format string '%s' - (Originally from FSComp.txt:595) - - - - - Types cannot inherit from multiple concrete types - (Originally from FSComp.txt:782) - - - - - Types cannot contain nested type definitions - (Originally from FSComp.txt:763) - - - - - Struct types are always sealed - (Originally from FSComp.txt:794) - - - - - Record types are always sealed - (Originally from FSComp.txt:792) - - - - - Enum types are always sealed - (Originally from FSComp.txt:796) - - - - - Delegate types are always sealed - (Originally from FSComp.txt:795) - - - - - Discriminated union types are always sealed - (Originally from FSComp.txt:791) - - - - - Assembly code types are always sealed - (Originally from FSComp.txt:793) - - - - - 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. - (Originally from FSComp.txt:818) - - - - - This type test or downcast will erase the provided type '%s' to the type '%s' - (Originally from FSComp.txt:1224) - - - - - This type test or downcast will ignore the unit-of-measure '%s' - (Originally from FSComp.txt:1121) - - - - - This type test with a provided type '%s' is not allowed because this provided type will be erased to '%s' at runtime. - (Originally from FSComp.txt:1226) - - - - - This type requires a definition - (Originally from FSComp.txt:779) - - - - - 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). - (Originally from FSComp.txt:520) - - - - - Type parameter cannot be used as type constructor - (Originally from FSComp.txt:566) - - - - - This type parameter has been used in a way that constrains it to always be '%s' - (Originally from FSComp.txt:519) - - - - - This value, type or method expects %d type parameter(s) but was given %d - (Originally from FSComp.txt:542) - - - - - type or module - (Originally from FSComp.txt:765) - - - - - The type '%s' is not an interface type - (Originally from FSComp.txt:740) - - - - - This type is not an interface type - (Originally from FSComp.txt:758) - - - - - This type is not a record type. Values of class and struct types must be created using calls to object constructors. - (Originally from FSComp.txt:645) - - - - - This type is not a record type - (Originally from FSComp.txt:646) - - - - - This type is not accessible from this code location - (Originally from FSComp.txt:692) - - - - - This type has no nested types - (Originally from FSComp.txt:564) - - - - - This type has no accessible object constructors - (Originally from FSComp.txt:655) - - - - - type, exception or module - (Originally from FSComp.txt:764) - - - - - This type does not inherit Attribute, it will not work correctly with other .NET languages. - (Originally from FSComp.txt:1515) - - - - - Type definitions may only have one 'inherit' specification and it must be the first declaration - (Originally from FSComp.txt:811) - - - - - 'let' and 'do' bindings must come before member and interface definitions in type definitions - (Originally from FSComp.txt:812) - - - - - This type definition involves an immediate cyclic reference through a struct field or inheritance relation - (Originally from FSComp.txt:807) - - - - - This type definition involves an immediate cyclic reference through an abbreviation - (Originally from FSComp.txt:806) - - - - - This downcast will erase the provided type '%s' to the type '%s'. - (Originally from FSComp.txt:1225) - - - - - The type '%s' 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 - (Originally from FSComp.txt:549) - - - - - Type abbreviations cannot have members - (Originally from FSComp.txt:747) - - - - - As of F# 4.1, the accessibility of type abbreviations is checked at compile-time. Consider changing the accessibility of the type abbreviation. Ignoring this warning might lead to runtime errors. - (Originally from FSComp.txt:748) - - - - - Type abbreviations cannot have interface declarations - (Originally from FSComp.txt:756) - - - - - Type abbreviations cannot have augmentations - (Originally from FSComp.txt:816) - - - - - 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 ...'. - (Originally from FSComp.txt:780) - - - - - One tuple type is a struct tuple, the other is a reference tuple - (Originally from FSComp.txt:1375) - - - - - This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead. - (Originally from FSComp.txt:1495) - - - - - 'try/with' expressions may not be used in queries - (Originally from FSComp.txt:1317) - - - - - 'try'/'with' cannot be used within sequence expressions - (Originally from FSComp.txt:651) - - - - - A trait may not specify optional, in, out, ParamArray, CallerInfo or Quote arguments - (Originally from FSComp.txt:1682) - - - - - Trait '%s' is static - (Originally from FSComp.txt:1680) - - - - - Trait '%s' is not static - (Originally from FSComp.txt:1681) - - - - - Invocation of a static constraint should use \"'T.Ident\" and not \"^T.Ident\", even for statically resolved type parameters. - (Originally from FSComp.txt:1684) - - - - - The trait '%s' invoked by this call has multiple support types. This invocation syntax is not permitted for such traits. See https://aka.ms/fsharp-srtp for guidance. - (Originally from FSComp.txt:1687) - - - - - Thread-static and context-static variables must be static and given the [<DefaultValue>] attribute to indicate that the value is initialized to the default value on each new thread - (Originally from FSComp.txt:731) - - - - - This member, function or value declaration may not be declared 'inline' - (Originally from FSComp.txt:1322) - - - - - This type definition may not have the 'CLIMutable' attribute. Only record types may have this attribute. - (Originally from FSComp.txt:1304) - - - - - Invalid provided field. Provided fields of erased provided types must be literals. - (Originally from FSComp.txt:1333) - - - - - The syntax 'expr.id' may only be used with record labels, properties and fields - (Originally from FSComp.txt:666) - - - - - Syntax error - unexpected '?' symbol - (Originally from FSComp.txt:587) - - - - - '%s' may only be used to construct object types - (Originally from FSComp.txt:615) - - - - - SynType.Or is not permitted in this declaration - (Originally from FSComp.txt:1692) - - - - - This expression implicitly converts type '%s' to type '%s'. See https://aka.ms/fsharp-implicit-convs. - (Originally from FSComp.txt:1635) - - - - - The struct, record or union type '%s' has the 'StructuralEquality' attribute but the component type '%s' does not satisfy the 'equality' constraint - (Originally from FSComp.txt:1066) - - - - - The struct, record or union type '%s' has the 'StructuralEquality' attribute but the type parameter '%s' does not satisfy the 'equality' constraint. Consider adding the 'equality' constraint to the type parameter - (Originally from FSComp.txt:1065) - - - - - The struct, record or union type '%s' has the 'StructuralComparison' attribute but the component type '%s' does not satisfy the 'comparison' constraint - (Originally from FSComp.txt:1060) - - - - - The struct, record or union type '%s' has the 'StructuralComparison' attribute but the type parameter '%s' does not satisfy the 'comparison' constraint. Consider adding the 'comparison' constraint to the type parameter - (Originally from FSComp.txt:1059) - - - - - Each argument of the primary constructor for a struct must be given a type, for example 'type S(x1:int, x2: int) = ...'. These arguments determine the fields of the struct. - (Originally from FSComp.txt:1067) - - - - - Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type. - (Originally from FSComp.txt:752) - - - - - Structs cannot contain 'do' bindings because the default constructor for structs would not execute these bindings - (Originally from FSComp.txt:751) - - - - - Structs, interfaces, enums and delegates cannot inherit from other types - (Originally from FSComp.txt:781) - - - - - Structs cannot have an object constructor with no arguments. This is a restriction imposed on all CLI languages as structs automatically support a default constructor. - (Originally from FSComp.txt:723) - - - - - Structs may only bind a 'this' parameter at member declarations - (Originally from FSComp.txt:514) - - - - - If a multicase union type is a struct, then all union cases must have unique names. For example: 'type A = B of b: int | C of c: int'. - (Originally from FSComp.txt:1384) - - - - - Struct types cannot contain abstract members - (Originally from FSComp.txt:801) - - - - - Static 'val' fields in types must be mutable, private and marked with the '[<DefaultValue>]' attribute. They are initialized to the 'null' or 'zero' value for their type. Consider also using a 'static let mutable' binding in a class type. - (Originally from FSComp.txt:734) - - - - - Static optimization conditionals are only for use within the F# library - (Originally from FSComp.txt:672) - - - - - This static member should not have a 'this' parameter. Consider using the notation 'member Member(args) = ...'. - (Originally from FSComp.txt:533) - - - - - For F#7 and lower, static value definitions may only be used in types with a primary constructor ('type X(args) = ...'). To enable them in all other types, use language version 'preview'. - (Originally from FSComp.txt:753) - - - - - Interfaces cannot contain definitions of static initializers - (Originally from FSComp.txt:718) - - - - - A static initializer requires an argument - (Originally from FSComp.txt:531) - - - - - A static field was used where an instance field is expected - (Originally from FSComp.txt:484) - - - - - Static bindings cannot be added to extrinsic augmentations. Consider using a 'static member' instead. - (Originally from FSComp.txt:1720) - - - - - A simple method name is required here - (Originally from FSComp.txt:625) - - - - - Cannot call '%s' - a setter for init-only property, please use object initialization instead. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization - (Originally from FSComp.txt:664) - - - - - In sequence expressions, results are generated using 'yield' - (Originally from FSComp.txt:489) - - - - - Array method '%s' is supplied by the runtime and cannot be directly used in code. For operations with array elements consider using family of GetArray/SetArray functions from LanguagePrimitives.IntrinsicFunctions module. - (Originally from FSComp.txt:1346) - - - - - Return values cannot have names - (Originally from FSComp.txt:495) - - - - - Return types of union cases must be identical to the type being defined, up to abbreviations - (Originally from FSComp.txt:738) - - - - - 'return' and 'return!' may not be used in queries - (Originally from FSComp.txt:1315) - - - - - Using resumable code or resumable state machines requires /langversion:preview - (Originally from FSComp.txt:1656) - - - - - Resumable code invocation. Suppress this warning if you are defining new low-level resumable code in terms of existing resumable code. - (Originally from FSComp.txt:1660) - - - - - Invalid resumable code. Any method of function accepting or returning resumable code must be marked 'inline' - (Originally from FSComp.txt:1652) - - - - - Invalid resumable code. A 'let rec' occured in the resumable code specification - (Originally from FSComp.txt:1655) - - - - - Invalid resumable code. Resumable code parameter must have name beginning with '__expand' - (Originally from FSComp.txt:1653) - - - - - Invalid resumable code. A resumable code parameter must be of delegate or function type - (Originally from FSComp.txt:1654) - - - - - 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 '[<Sealed>] attribute to the type definition in the signature - (Originally from FSComp.txt:808) - - - - - This is not a variable, constant, active recognizer or literal - (Originally from FSComp.txt:584) - - - - - The 'let! ... and! ...' construct may only be used if the computation expression builder defines either a '%s' method or appropriate 'MergeSources' and 'Bind' methods - (Originally from FSComp.txt:1529) - - - - - This control construct may only be used if the computation expression builder defines a '%s' method - (Originally from FSComp.txt:563) - - - - - Only active patterns returning exactly one result may accept arguments - (Originally from FSComp.txt:576) - - - - - The representation of this type is hidden by the signature. It must be given an attribute such as [<Sealed>], [<Class>] or [<Interface>] to indicate the characteristics of the type. - (Originally from FSComp.txt:787) - - - - - Recursive bindings that include member specifications can only occur as a direct augmentation of a type - (Originally from FSComp.txt:725) - - - - - Records, union, abbreviations and struct types cannot have the 'AllowNullLiteral' attribute - (Originally from FSComp.txt:783) - - - - - This record contains fields from inconsistent types - (Originally from FSComp.txt:512) - - - - - The 'rec' on this module is implied by an outer 'rec' declaration and is being ignored - (Originally from FSComp.txt:1379) - - - - - A property cannot have explicit type parameters. Consider using a method instead. - (Originally from FSComp.txt:527) - - - - - This property or field was not found on this custom attribute type - (Originally from FSComp.txt:699) - - - - - Property '%s' is static - (Originally from FSComp.txt:661) - - - - - Property '%s' is not static - (Originally from FSComp.txt:658) - - - - - Property '%s' is not readable - (Originally from FSComp.txt:659) - - - - - Property '%s' cannot be set - (Originally from FSComp.txt:662) - - - - - This property cannot be set - (Originally from FSComp.txt:698) - - - - - The types System.ValueType, System.Enum, System.Delegate, System.MulticastDelegate and System.Array cannot be used as super types in an object expression or class - (Originally from FSComp.txt:626) - - - - - The syntax '(expr1)[expr2]' is now reserved for indexing and is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction (expr1) [expr2]'. - (Originally from FSComp.txt:1604) - - - - - The syntax '(expr1)[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use '(expr1).[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction (expr1) [expr2]'. - (Originally from FSComp.txt:1607) - - - - - A parameter with attributes must also be given a name, e.g. '[<Attribute>] Name : Type' - (Originally from FSComp.txt:494) - - - - - The parameter '%s' was inferred to have byref type. Parameters of byref type must be given an explicit type annotation, e.g. 'x1: byref<int>'. When used, a byref parameter is implicitly dereferenced. - (Originally from FSComp.txt:1082) - - - - - You must explicitly declare either all or no type parameters when overriding a generic abstract method - (Originally from FSComp.txt:522) - - - - - Accessibility modifiers are not permitted on overrides or interface implementations - (Originally from FSComp.txt:790) - - - - - This override takes a tuple instead of multiple arguments. Try to add an additional layer of parentheses at the method definition (e.g. 'member _.Foo((x, y))'), or remove parentheses at the abstract method declaration (e.g. 'abstract member Foo: 'a * 'b -> 'c'). - (Originally from FSComp.txt:1722) - - - - - This override takes a different number of arguments to the corresponding abstract member. The following abstract members were found:%s - (Originally from FSComp.txt:710) - - - - - One or more of the overloads of this method has curried arguments. Consider redesigning these members to take arguments in tupled form. - (Originally from FSComp.txt:670) - - - - - The syntax 'expr1[expr2]' is now reserved for indexing and is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. - (Originally from FSComp.txt:1606) - - - - - The syntax 'expr1[expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use 'expr1.[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction expr1 [expr2]'. - (Originally from FSComp.txt:1609) - - - - - Optional arguments cannot be used in custom attributes - (Originally from FSComp.txt:697) - - - - - Optional arguments are only permitted on type members - (Originally from FSComp.txt:572) - - - - - Optional arguments must come at the end of the argument list, after any non-optional arguments - (Originally from FSComp.txt:1107) - - - - - '%s' must be followed by 'in'. Usage: %s. - (Originally from FSComp.txt:1340) - - - - - Incorrect syntax for '%s'. Usage: %s. - (Originally from FSComp.txt:1268) - - - - - The operator '%s' does not accept the use of 'into' - (Originally from FSComp.txt:1302) - - - - - This declaration opens the namespace or module '%s' through a partially qualified path. Adjust this code to use the full path of the namespace. This change will make your code more robust as new constructs are added to the F# and CLI libraries. - (Originally from FSComp.txt:745) - - - - - In a recursive declaration group, 'open' declarations must come first in each module - (Originally from FSComp.txt:1380) - - - - - Only types representing units-of-measure may be given the 'Measure' attribute - (Originally from FSComp.txt:789) - - - - - Only structs and classes without primary constructors may be given the 'StructLayout' attribute - (Originally from FSComp.txt:786) - - - - - Only simple variable patterns can be bound in 'let rec' constructs - (Originally from FSComp.txt:726) - - - - - Only simple bindings of the form 'id = expr' can be used in construction expressions - (Originally from FSComp.txt:632) - - - - - Mutable 'let' bindings can't be recursive or defined in recursive modules or namespaces - (Originally from FSComp.txt:727) - - - - - Only functions may be marked 'inline' - (Originally from FSComp.txt:686) - - - - - Only classes may be given the 'AbstractClass' attribute - (Originally from FSComp.txt:788) - - - - - Objects must be initialized by an object construction expression that calls an inherited object constructor and assigns a value to each field - (Originally from FSComp.txt:633) - - - - - The operator 'expr.[idx]' has been used on an object of indeterminate type based on information prior to this program point. Consider adding further type constraints - (Originally from FSComp.txt:606) - - - - - Only overrides of abstract and virtual members may be specified in object expressions - (Originally from FSComp.txt:620) - - - - - This form of object expression is not used in F#. Use 'member this.MemberName ... = ...' to define member implementations in object expressions. - (Originally from FSComp.txt:537) - - - - - Calls to object constructors on type parameters cannot be given arguments - (Originally from FSComp.txt:608) - - - - - Interfaces cannot contain definitions of object constructors - (Originally from FSComp.txt:719) - - - - - An object constructor requires an argument - (Originally from FSComp.txt:532) - - - - - 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 - (Originally from FSComp.txt:643) - - - - - Object construction expressions may only be used to implement constructors in class types - (Originally from FSComp.txt:631) - - - - - This numeric literal requires that a module '%s' defining functions FromZero, FromOne, FromInt32, FromInt64 and FromString be in scope - (Originally from FSComp.txt:639) - - - - - This is not a valid name for an enumeration case - (Originally from FSComp.txt:599) - - - - - This code is not sufficiently generic. The type variable %s could not be generalized because it would escape its scope. - (Originally from FSComp.txt:526) - - - - - The value '%s' is not a function and does not support index notation. - (Originally from FSComp.txt:1593) - - - - - This expression is not a function and does not support index notation. - (Originally from FSComp.txt:1594) - - - - - Not an exception - (Originally from FSComp.txt:773) - - - - - This value supports indexing, e.g. '%s.[index]'. The syntax '%s[index]' requires /langversion:preview. See https://aka.ms/fsharp-index-notation. - (Originally from FSComp.txt:1591) - - - - - This expression supports indexing, e.g. 'expr.[index]'. The syntax 'expr[index]' requires /langversion:preview. See https://aka.ms/fsharp-index-notation. - (Originally from FSComp.txt:1592) - - - - - Non-zero constants cannot have generic units. For generic zero, write 0.0<_>. - (Originally from FSComp.txt:488) - - - - - The generic member '%s' has been used at a non-uniform instantiation prior to this program point. Consider reordering the members so this member occurs first. Alternatively, specify the full type of the member explicitly, including argument types, return type and any additional generic parameters and constraints. - (Originally from FSComp.txt:1083) - - - - - This 'let' definition may not be used in a query. Only simple value definitions may be used in queries. - (Originally from FSComp.txt:1318) - - - - - This value is not a literal and cannot be used in a pattern - (Originally from FSComp.txt:545) - - - - - 'while' expressions may not be used in queries - (Originally from FSComp.txt:1311) - - - - - 'try/finally' expressions may not be used in queries - (Originally from FSComp.txt:1312) - - - - - No abstract property was found that corresponds to this override - (Originally from FSComp.txt:713) - - - - - No abstract or interface member was found that corresponds to this override - (Originally from FSComp.txt:709) - - - - - Interface implementations cannot be given on construction expressions - (Originally from FSComp.txt:630) - - - - - In queries, use the form 'for x in n .. m do ...' for ranging over integers - (Originally from FSComp.txt:1310) - - - - - The struct, record or union type '%s' does not support structural equality because the type '%s' does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '%s' to clarify that the type does not support structural equality - (Originally from FSComp.txt:1064) - - - - - The struct, record or union type '%s' does not support structural equality because the type parameter %s does not satisfy the 'equality' constraint. Consider adding the 'NoEquality' attribute to the type '%s' to clarify that the type does not support structural equality - (Originally from FSComp.txt:1063) - - - - - Using methods with 'NoEagerConstraintApplicationAttribute' requires /langversion:6.0 or later - (Originally from FSComp.txt:1657) - - - - - The struct, record or union type '%s' is not structurally comparable because the type '%s' does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '%s' to clarify that the type is not comparable - (Originally from FSComp.txt:1062) - - - - - The struct, record or union type '%s' is not structurally comparable because the type parameter %s does not satisfy the 'comparison' constraint. Consider adding the 'NoComparison' attribute to the type '%s' to clarify that the type is not comparable - (Originally from FSComp.txt:1061) - - - - - No arguments may be given when constructing a record value - (Originally from FSComp.txt:629) - - - - - The member '%s' does not correspond to any abstract or virtual method available to override or implement. - (Originally from FSComp.txt:621) - - - - - 'new' may only be used with object constructors - (Originally from FSComp.txt:637) - - - - - 'new' must be used with a named type - (Originally from FSComp.txt:627) - - - - - This new member hides the abstract member '%s' once tuples, functions, units of measure and/or provided types are erased. Rename the member or use 'override' instead. - (Originally from FSComp.txt:717) - - - - - This new member hides the abstract member '%s'. Rename the member or use 'override' instead. - (Originally from FSComp.txt:716) - - - - - 'new' cannot be used on interface types. Consider using an object expression '{ new ... with ... }' instead. - (Originally from FSComp.txt:612) - - - - - Namespaces cannot contain values. Consider using a module to hold your value declarations. - (Originally from FSComp.txt:41) - - - - - Namespaces cannot contain extension members except in the same file and namespace declaration group where the type is defined. Consider using a module to hold declarations of extension members. - (Originally from FSComp.txt:497) - - - - - '%s' may only be used with named types - (Originally from FSComp.txt:610) - - - - - Named arguments cannot be given to member trait calls - (Originally from FSComp.txt:598) - - - - - The named argument '%s' did not match any argument or mutable property - (Originally from FSComp.txt:669) - - - - - %s is an active pattern and cannot be treated as a discriminated union case with named fields. - (Originally from FSComp.txt:1389) - - - - - Name '%s' not bound in pattern context - (Originally from FSComp.txt:573) - - - - - Named arguments must appear after all other arguments - (Originally from FSComp.txt:547) - - - - - Mutable function values should be written 'let mutable f = (fun args -> ...)' - (Originally from FSComp.txt:685) - - - - - Mutable values cannot have generic parameters - (Originally from FSComp.txt:684) - - - - - Mutable values cannot be marked 'inline' - (Originally from FSComp.txt:683) - - - - - Multiple visibility attributes have been specified for this identifier. 'let' bindings in classes are always private, as are any 'let' bindings inside expressions. - (Originally from FSComp.txt:499) - - - - - Multiple visibility attributes have been specified for this identifier - (Originally from FSComp.txt:498) - - - - - Multiple type matches were found:\n%s\nThe type '%s' was used. Due to the overlapping field names\n%s\nconsider using type annotations or change the order of open statements. - (Originally from FSComp.txt:1712) - - - - - The field '%s' appears multiple times in this record expression or pattern - (Originally from FSComp.txt:524) - - - - - This declaration opens the module '%s', which is marked as 'RequireQualifiedAccess'. 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. - (Originally from FSComp.txt:744) - - - - - The path '%s' is a namespace. A module abbreviation may not abbreviate a namespace. - (Originally from FSComp.txt:817) - - - - - In a recursive declaration group, module abbreviations must come after all 'open' declarations and before other declarations - (Originally from FSComp.txt:1381) - - - - - The following required properties have to be initalized:%s - (Originally from FSComp.txt:1688) - - - - - A custom query operation for '%s' is required but not specified - (Originally from FSComp.txt:1238) - - - - - Method overrides and interface implementations are not permitted here - (Originally from FSComp.txt:708) - - - - - Method '%s' is not accessible from this code location - (Originally from FSComp.txt:485) - - - - - 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 client code to bring the extension members into scope. - (Originally from FSComp.txt:809) - - - - - 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. - (Originally from FSComp.txt:819) - - - - - Interfaces cannot contain definitions of member overrides - (Originally from FSComp.txt:720) - - - - - Extension members cannot provide operator overloads. Consider defining the operator as part of the type definition instead. - (Originally from FSComp.txt:1109) - - - - - This member is not permitted in an interface implementation - (Originally from FSComp.txt:761) - - - - - SynMemberKind.PropertyGetSet only expected in parse trees - (Originally from FSComp.txt:496) - - - - - This member is not sufficiently generic - (Originally from FSComp.txt:728) - - - - - The type %s contains the member '%s' but it is not a virtual or abstract method that is available to override or implement. - (Originally from FSComp.txt:622) - - - - - A member and a local class binding both have the name '%s' - (Originally from FSComp.txt:755) - - - - - Measure definitions cannot have type parameters - (Originally from FSComp.txt:778) - - - - - Measure declarations may have only static members: constructors are not available - (Originally from FSComp.txt:754) - - - - - Measure declarations may have only static members - (Originally from FSComp.txt:750) - - - - - 'match' expressions may not be used in queries - (Originally from FSComp.txt:1337) - - - - - This lookup cannot be used here - (Originally from FSComp.txt:660) - - - - - Local class bindings cannot be marked inline. Consider lifting the definition out of the class or else do not mark it as inline. - (Originally from FSComp.txt:746) - - - - - Cannot assign '%s' to a value marked literal - (Originally from FSComp.txt:1598) - - - - - Cannot assign a value to another value marked literal - (Originally from FSComp.txt:1599) - - - - - This literal pattern does not take arguments - (Originally from FSComp.txt:1369) - - - - - Literal values cannot have generic parameters - (Originally from FSComp.txt:690) - - - - - A literal value cannot be marked 'mutable' - (Originally from FSComp.txt:688) - - - - - A literal value cannot be marked 'inline' - (Originally from FSComp.txt:689) - - - - - A declaration may only be the [<Literal>] attribute if a constant value is also given, e.g. 'val x: int = 1' - (Originally from FSComp.txt:729) - - - - - A [<Literal>] declaration cannot use an active pattern for its identifier - (Originally from FSComp.txt:1649) - - - - - The syntax '[expr1][expr2]' is now reserved for indexing and is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction [expr1] [expr2]'. - (Originally from FSComp.txt:1605) - - - - - The syntax '[expr1][expr2]' is ambiguous when used as an argument. See https://aka.ms/fsharp-index-notation. If you intend indexing or slicing then you must use '(expr1).[expr2]' in argument position. If calling a function with multiple curried arguments, add a space between them, e.g. 'someFunction [expr1] [expr2]'. - (Originally from FSComp.txt:1608) - - - - - This list expression exceeds the maximum size for list literals. Use an array for larger literals and call Array.ToList. - (Originally from FSComp.txt:596) - - - - - This definition may only be used in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - (Originally from FSComp.txt:815) - - - - - This code is less generic than required by its annotations because the explicit type variable '%s' could not be generalized. It was constrained to be '%s'. - (Originally from FSComp.txt:516) - - - - - The kind of the type specified by its attributes does not match the kind implied by its definition - (Originally from FSComp.txt:777) - - - - - In queries, '%s' must use a simple pattern - (Originally from FSComp.txt:1237) - - - - - A type annotated with IsReadOnly must also be a struct. Consider adding the [<Struct>] attribute to the type. - (Originally from FSComp.txt:1506) - - - - - Invalid use of a type name - (Originally from FSComp.txt:654) - - - - - Invalid use of reverse index in list expression. - (Originally from FSComp.txt:1600) - - - - - Invalid use of an interface type - (Originally from FSComp.txt:656) - - - - - Invalid use of a delegate constructor. Use the syntax 'new Type(args)' or just 'Type(args)'. - (Originally from FSComp.txt:657) - - - - - The 'UseNullAsTrueValue' attribute flag may only be used with union types that have one nullary case and at least one non-nullary case - (Originally from FSComp.txt:1081) - - - - - 'use' bindings must be of the form 'use <var> = <expr>' - (Originally from FSComp.txt:706) - - - - - use! may not be combined with and! - (Originally from FSComp.txt:1531) - - - - - 'use!' bindings must be of the form 'use! <var> = <expr>' - (Originally from FSComp.txt:1116) - - - - - Units-of-measure cannot be used as prefix arguments to a type. Rewrite as postfix arguments in angle brackets. - (Originally from FSComp.txt:561) - - - - - Units-of-measure are only supported on float, float32, decimal, and integer types. - (Originally from FSComp.txt:491) - - - - - Literal enumerations must have type int, uint, int16, uint16, int64, uint64, byte, sbyte or char - (Originally from FSComp.txt:805) - - - - - Invalid type extension - (Originally from FSComp.txt:775) - - - - - Type arguments cannot be specified here - (Originally from FSComp.txt:575) - - - - - The number of type arguments did not match: '%d' given, '%d' expected. This may be related to a previously reported error. - (Originally from FSComp.txt:1231) - - - - - The use of '[<Struct>]' on values, functions and methods is only allowed on partial active pattern definitions - (Originally from FSComp.txt:1633) - - - - - Invalid signature for set member - (Originally from FSComp.txt:715) - - - - - Invalid record, sequence or computation expression. Sequence expressions should be of the form 'seq { ... }' - (Originally from FSComp.txt:593) - - - - - Invalid constraint. Valid constraint forms include \"'T :> ISomeInterface\" for interface constraints and \"SomeConstrainingType<'T>\" for self-constraints. See https://aka.ms/fsharp-type-constraints. - (Originally from FSComp.txt:1683) - - - - - The construct '%s' may only be used in valid resumable code. - (Originally from FSComp.txt:1651) - - - - - Invalid join relation in '%s'. Expected 'expr <op> expr', where <op> is =, =?, ?= or ?=?. - (Originally from FSComp.txt:1295) - - - - - Invalid record construction - (Originally from FSComp.txt:640) - - - - - 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)'. - (Originally from FSComp.txt:556) - - - - - This is not a valid pattern - (Originally from FSComp.txt:585) - - - - - Invalid optional assignment to a property or field - (Originally from FSComp.txt:674) - - - - - 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. - (Originally from FSComp.txt:504) - - - - - 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. - (Originally from FSComp.txt:505) - - - - - The '%s' operator should not normally be redefined. Consider using a different operator name - (Originally from FSComp.txt:506) - - - - - Invalid object, sequence or record expression - (Originally from FSComp.txt:592) - - - - - Invalid object expression. Objects without overrides or interfaces should use the expression form 'new Type(args)' without braces. - (Originally from FSComp.txt:591) - - - - - This is not a valid object construction expression. Explicit object constructors must either call an alternate constructor or initialize all fields of the object and specify a call to a super class constructor. - (Originally from FSComp.txt:551) - - - - - Non-primitive numeric literal constants cannot 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 <variable> = <constant>' at the end of the match clause. - (Originally from FSComp.txt:574) - - - - - 'new' constraints must take one argument of type 'unit' and return the constructed type - (Originally from FSComp.txt:555) - - - - - Invalid namespace, module, type or union case name - (Originally from FSComp.txt:736) - - - - - Invalid module name - (Originally from FSComp.txt:774) - - - - - This recursive binding uses an invalid mixture of recursive forms - (Originally from FSComp.txt:550) - - - - - 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 CLI languages then use the name '%s' instead. - (Originally from FSComp.txt:500) - - - - - 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 CLI languages then use the name '%s' instead. - (Originally from FSComp.txt:501) - - - - - 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 - (Originally from FSComp.txt:503) - - - - - Invalid member name. Members may not have name '.ctor' or '.cctor' - (Originally from FSComp.txt:1229) - - - - - The name '(%s)' should not be used as a member name. If defining a static member for use from other CLI languages then use the name '%s' instead. - (Originally from FSComp.txt:502) - - - - - Invalid member declaration. The name of the member is missing or has parentheses. - (Originally from FSComp.txt:1676) - - - - - Invalid inline specification - (Originally from FSComp.txt:705) - - - - - Incomplete expression or invalid use of indexer syntax - (Originally from FSComp.txt:605) - - - - - The '%s' operator cannot be redefined. Consider using a different operator name - (Originally from FSComp.txt:507) - - - - - Internal error. Invalid index into active pattern array - (Originally from FSComp.txt:578) - - - - - This is not a valid value for an enumeration literal - (Originally from FSComp.txt:739) - - - - - An 'enum' constraint must be of the form 'enum<type>' - (Originally from FSComp.txt:554) - - - - - Delegate specifications must be of the form 'typ -> typ' - (Originally from FSComp.txt:803) - - - - - Invalid declaration - (Originally from FSComp.txt:538) - - - - - Invalid constraint: the type used for the constraint is sealed, which means the constraint could only be satisfied by at most one solution - (Originally from FSComp.txt:553) - - - - - Invalid constraint - (Originally from FSComp.txt:552) - - - - - This is not a valid constant expression - (Originally from FSComp.txt:691) - - - - - Invalid assignment - (Originally from FSComp.txt:653) - - - - - Invalid argument to parameterized pattern label - (Originally from FSComp.txt:577) - - - - - Invalid alignment in interpolated string - (Originally from FSComp.txt:1619) - - - - - This is not a valid name for an active pattern - (Originally from FSComp.txt:681) - - - - - A use of 'into' must be followed by the remainder of the computation - (Originally from FSComp.txt:1301) - - - - - Mismatch in interpolated string. Interpolated strings may not use '%%' format specifiers unless each is given an expression, e.g. '%%d{1+1}' - (Originally from FSComp.txt:1618) - - - - - Interfaces inherited by other interfaces should be declared using 'inherit ...' instead of 'interface ...' - (Originally from FSComp.txt:1098) - - - - - Interface types cannot be sealed - (Originally from FSComp.txt:802) - - - - - Interface types and delegate types cannot contain fields - (Originally from FSComp.txt:797) - - - - - This instance member needs a parameter to represent the object being invoked. Make the member static or use the notation 'member x.Member(args) = ...'. - (Originally from FSComp.txt:529) - - - - - The 'InlineIfLambda' attribute may only be used on parameters of inlined functions of methods whose type is a function or F# delegate type. - (Originally from FSComp.txt:1674) - - - - - Init-only property '%s' cannot be set outside the initialization code. See https://aka.ms/fsharp-assigning-values-to-properties-at-initialization - (Originally from FSComp.txt:663) - - - - - The inherited type is not an object model type - (Originally from FSComp.txt:642) - - - - - A inheritance declaration is not permitted here - (Originally from FSComp.txt:743) - - - - - This 'inherit' declaration specifies the inherited type but no arguments. Consider supplying arguments, e.g. 'inherit BaseType(args)'. - (Originally from FSComp.txt:813) - - - - - This 'inherit' declaration has arguments, but is not in a type with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - (Originally from FSComp.txt:814) - - - - - 'inherit' cannot be used on interface types. Consider implementing the interface by using 'interface ... with ... end' instead. - (Originally from FSComp.txt:611) - - - - - This is a function definition that shadows a union case. If this is what you want, ignore or suppress this warning. If you want it to be a union case deconstruction, add parentheses. - (Originally from FSComp.txt:1727) - - - - - The function or member '%s' is used in a way that requires further type annotations at its definition to ensure consistency of inferred types. The inferred signature is '%s'. - (Originally from FSComp.txt:1230) - - - - - The syntax 'arr.[idx]' is now revised to 'arr[idx]'. Please update your code. - (Originally from FSComp.txt:1602) - - - - - Implicit product of measures following / - (Originally from FSComp.txt:486) - - - - - This expression uses the implicit conversion '%s' to convert type '%s' to type '%s'. See https://aka.ms/fsharp-implicit-convs. This warning may be disabled using '#nowarn \"3391\". - (Originally from FSComp.txt:1644) - - - - - This expression uses the implicit conversion '%s' to convert type '%s' to type '%s'. - (Originally from FSComp.txt:1648) - - - - - The struct, record or union type '%s' implements the interface 'System.IStructuralEquatable' explicitly. Apply the 'CustomEquality' attribute to the type. - (Originally from FSComp.txt:766) - - - - - The struct, record or union type '%s' implements the interface 'System.IStructuralComparable' explicitly. Apply the 'CustomComparison' attribute to the type. - (Originally from FSComp.txt:511) - - - - - The struct, record or union type '%s' implements the interface 'System.IEquatable<_>' explicitly. Apply the 'CustomEquality' attribute to the type and provide a consistent implementation of the non-generic override 'System.Object.Equals(obj)'. - (Originally from FSComp.txt:767) - - - - - The struct, record or union type '%s' implements the interface 'System.IComparable' explicitly. You must apply the 'CustomComparison' attribute to the type. - (Originally from FSComp.txt:509) - - - - - The struct, record or union type '%s' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable. - (Originally from FSComp.txt:510) - - - - - Illegal syntax in type expression - (Originally from FSComp.txt:567) - - - - - This is not valid literal expression. The [<Literal>] attribute will be ignored. - (Originally from FSComp.txt:1355) - - - - - Illegal pattern - (Originally from FSComp.txt:586) - - - - - Explicit type declarations for constructors must be of the form 'ty1 * ... * tyN -> resTy'. Parentheses may be required around 'resTy' - (Originally from FSComp.txt:737) - - - - - Byref types are not allowed in an open type declaration. - (Originally from FSComp.txt:1523) - - - - - A literal value cannot be given the [<ThreadStatic>] or [<ContextStatic>] attributes - (Originally from FSComp.txt:687) - - - - - An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead. - (Originally from FSComp.txt:1258) - - - - - It is recommended that objects supporting the IDisposable interface are created using the syntax 'new Type(args)', rather than 'Type(args)' or 'Type' as a function value representing the constructor, to indicate that resources may be owned by the generated value - (Originally from FSComp.txt:614) - - - - - The syntax 'expr1[expr2]' is now reserved for indexing. See https://aka.ms/fsharp-index-notation. If calling a function, add a space between the function and argument, e.g. 'someFunction [expr]'. - (Originally from FSComp.txt:1603) - - - - - The syntax 'expr1[expr2]' is used for indexing. Consider adding a type annotation to enable indexing, or if calling a function add a space, e.g. 'expr1 [expr2]'. - (Originally from FSComp.txt:1601) - - - - - The system type '%s' was required but no referenced system DLL contained this type - (Originally from FSComp.txt:1391) - - - - - Generic types cannot be given the 'StructLayout' attribute - (Originally from FSComp.txt:785) - - - - - A generic type parameter has been used in a way that constrains it to always be '%s' - (Originally from FSComp.txt:518) - - - - - The provided types generated by this use of a type provider may not be used from other F# assemblies and should be marked internal or private. Consider using 'type internal TypeName = ...' or 'type private TypeName = ...'. - (Originally from FSComp.txt:1344) - - - - - The generic function '%s' must be given explicit type argument(s) - (Originally from FSComp.txt:540) - - - - - 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 %d arguments. - (Originally from FSComp.txt:548) - - - - - The corresponding formal argument is not optional - (Originally from FSComp.txt:673) - - - - - Invalid use of 'fixed'. 'fixed' may only be used in a declaration of the form 'use x = fixed expr' where the expression is one of the following: an array, the address of an array element, a string, a byref, an inref, or a type implementing GetPinnableReference() - (Originally from FSComp.txt:1386) - - - - - The field labels and expected type of this record expression or pattern do not uniquely determine a corresponding record type - (Originally from FSComp.txt:523) - - - - - A field/val declaration is not permitted here - (Originally from FSComp.txt:742) - - - - - This field requires a name - (Originally from FSComp.txt:735) - - - - - No assignment given for field '%s' of type '%s' - (Originally from FSComp.txt:618) - - - - - This field is not a literal and cannot be used in a pattern - (Originally from FSComp.txt:583) - - - - - Named field '%s' is used more than once. - (Originally from FSComp.txt:1352) - - - - - Named field '%s' conflicts with autogenerated name for anonymous field. - (Originally from FSComp.txt:1353) - - - - - This field is readonly - (Originally from FSComp.txt:546) - - - - - Field '%s' is not static - (Originally from FSComp.txt:582) - - - - - This field is not mutable - (Originally from FSComp.txt:600) - - - - - All record, union and struct types in FSharp.Core.dll must be explicitly labelled with 'StructuralComparison' or 'NoComparison' - (Originally from FSComp.txt:1058) - - - - - Extraneous fields have been given values - (Originally from FSComp.txt:619) - - - - - 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 - (Originally from FSComp.txt:594) - - - - - This expression form may only be used in sequence and computation expressions - (Originally from FSComp.txt:590) - - - - - The expression form { expr with ... } may only be used with record types. To build object types use { new Type(...) with ... } - (Originally from FSComp.txt:641) - - - - - The expression form 'expr then expr' may only be used as part of an explicit object constructor - (Originally from FSComp.txt:597) - - - - - Expected %d expressions, got %d - (Originally from FSComp.txt:588) - - - - - TcExprUndelayed: delayed - (Originally from FSComp.txt:589) - - - - - Explicit type specifications cannot be used for exception constructors - (Originally from FSComp.txt:768) - - - - - Explicit type parameters may only be used on module or member bindings - (Originally from FSComp.txt:521) - - - - - An explicit static initializer should use the syntax 'static new(args) = expr' - (Originally from FSComp.txt:534) - - - - - An explicit object constructor should use the syntax 'new(args) = expr' - (Originally from FSComp.txt:535) - - - - - Expected unit-of-measure, not type - (Originally from FSComp.txt:560) - - - - - Expected unit-of-measure parameter, not type parameter. Explicit unit-of-measure parameters must be marked with the [<Measure>] attribute. - (Originally from FSComp.txt:557) - - - - - Expected type parameter, not unit-of-measure parameter - (Originally from FSComp.txt:558) - - - - - Expected type, not unit-of-measure - (Originally from FSComp.txt:559) - - - - - Expected an interface type - (Originally from FSComp.txt:634) - - - - - Expected module or namespace parent %s - (Originally from FSComp.txt:508) - - - - - The exception '%s' does not have a field named '%s'. - (Originally from FSComp.txt:1348) - - - - - Exception abbreviations should not have argument lists - (Originally from FSComp.txt:769) - - - - - Exception abbreviations must refer to existing exceptions or F# types deriving from System.Exception - (Originally from FSComp.txt:771) - - - - - Event '%s' is static - (Originally from FSComp.txt:667) - - - - - Event '%s' is not static - (Originally from FSComp.txt:668) - - - - - Enumerations cannot have members - (Originally from FSComp.txt:749) - - - - - Enumerations cannot have interface declarations - (Originally from FSComp.txt:757) - - - - - The type '%s' is not a valid enumerator type , i.e. does not have a 'MoveNext()' method returning a bool, and a 'Current' property - (Originally from FSComp.txt:1118) - - - - - The 'EntryPointAttribute' attribute may only be used on function definitions in modules - (Originally from FSComp.txt:682) - - - - - '{ }' is not a valid expression. Records must include at least one field. Empty sequences are specified by using Seq.empty or an empty list '[]'. - (Originally from FSComp.txt:644) - - - - - Copy-and-update record expressions must include at least one field. - (Originally from FSComp.txt:1342) - - - - - Duplicate specification of an interface - (Originally from FSComp.txt:741) - - - - - The method or function '%s' should not be given explicit type argument(s) because it does not declare its type parameters explicitly - (Originally from FSComp.txt:541) - - - - - 'do!' cannot be used within sequence expressions - (Originally from FSComp.txt:649) - - - - - DLLImport stubs cannot be inlined - (Originally from FSComp.txt:513) - - - - - DLLImport bindings must be static members in a class or function definitions in a module - (Originally from FSComp.txt:1112) - - - - - Delegate specifications must not be curried types. Use 'typ * ... * typ -> typ' for multi-argument delegates, and 'typ -> (typ -> typ)' for delegates returning function values. - (Originally from FSComp.txt:804) - - - - - A delegate constructor must be passed a single function value - (Originally from FSComp.txt:675) - - - - - The 'DefaultValue' attribute may only be used on 'val' declarations - (Originally from FSComp.txt:679) - - - - - The default, zero-initializing constructor of a struct type may only be used if all the fields of the struct type admit default initialization - (Originally from FSComp.txt:543) - - - - - 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 - (Originally from FSComp.txt:760) - - - - - This method already has a default implementation - (Originally from FSComp.txt:711) - - - - - The method implemented by this default is ambiguous - (Originally from FSComp.txt:712) - - - - - One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on '%s' - (Originally from FSComp.txt:810) - - - - - This declaration element is not permitted in an augmentation - (Originally from FSComp.txt:762) - - - - - '%s' is not used correctly. Usage: %s. This is a custom operation in this query or computation expression. - (Originally from FSComp.txt:1263) - - - - - '%s' is not used correctly. This is a custom operation in this query or computation expression. - (Originally from FSComp.txt:1262) - - - - - A custom operation may not be used in conjunction with a non-value or recursive 'let' binding in another part of this computation expression - (Originally from FSComp.txt:1244) - - - - - A custom operation may not be used in conjunction with 'use', 'try/with', 'try/finally', 'if/then/else' or 'match' operators within this computation expression - (Originally from FSComp.txt:1245) - - - - - The custom operation '%s' refers to a method which is overloaded. The implementations of custom operations may not be overloaded. - (Originally from FSComp.txt:1246) - - - - - The definition of the custom operator '%s' does not use a valid combination of attribute flags - (Originally from FSComp.txt:1303) - - - - - '%s' is used with an incorrect number of arguments. This is a custom operation in this query or computation expression. Expected %d argument(s), but given %d. - (Originally from FSComp.txt:1270) - - - - - A custom attribute must invoke an object constructor - (Originally from FSComp.txt:702) - - - - - A custom attribute must be a reference type - (Originally from FSComp.txt:700) - - - - - The number of args for a custom attribute does not match the expected number of args for the attribute constructor - (Originally from FSComp.txt:701) - - - - - Could not find method System.Runtime.CompilerServices.OffsetToStringData in references when building 'fixed' expression. - (Originally from FSComp.txt:1387) - - - - - Couldn't find Dispose on IDisposable, or it was overloaded - (Originally from FSComp.txt:544) - - - - - This copy-and-update record expression changes all fields of record type '%s'. Consider using the record construction syntax instead. - (Originally from FSComp.txt:1704) - - - - - The input to a copy-and-update expression that creates an anonymous record must be either an anonymous record or a record - (Originally from FSComp.txt:1518) - - - - - Constructors are not permitted as extension members - they must be defined as part of the original definition of the type - (Originally from FSComp.txt:1370) - - - - - Constructors cannot be defined for this type - (Originally from FSComp.txt:724) - - - - - Constructors cannot be specified in exception augmentations - (Originally from FSComp.txt:722) - - - - - 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))'. - (Originally from FSComp.txt:665) - - - - - 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. - (Originally from FSComp.txt:616) - - - - - This object constructor requires arguments - (Originally from FSComp.txt:636) - - - - - Constructor expressions for interfaces do not take arguments - (Originally from FSComp.txt:635) - - - - - The constructor does not have a field named '%s'. - (Originally from FSComp.txt:1350) - - - - - A constructor cannot have explicit type parameters. Consider using a static construction method instead. - (Originally from FSComp.txt:528) - - - - - This construct may only be used within sequence or computation expressions - (Originally from FSComp.txt:603) - - - - - 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 - (Originally from FSComp.txt:601) - - - - - This construct may only be used within computation expressions. To return a value from an ordinary function simply write the expression without 'return'. - (Originally from FSComp.txt:602) - - - - - This construct may only be used within computation expressions - (Originally from FSComp.txt:604) - - - - - This construct is ambiguous as part of a sequence expression. Nested expressions may be written using 'let _ = (...)' and nested sequences using 'yield! seq {... }'. - (Originally from FSComp.txt:648) - - - - - This construct is ambiguous as part of a computation expression. Nested expressions may be written using 'let _ = (...)' and nested computations using 'let! res = builder { ... }'. - (Originally from FSComp.txt:647) - - - - - 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 - (Originally from FSComp.txt:517) - - - - - Attribute 'System.Diagnostics.ConditionalAttribute' is only valid on methods or attribute classes - (Originally from FSComp.txt:1108) - - - - - The 'ConditionalAttribute' attribute may only be used on members - (Originally from FSComp.txt:680) - - - - - Interfaces cannot contain definitions of concrete instance members. You may need to define a constructor on your type to indicate that the type is a class. - (Originally from FSComp.txt:721) - - - - - The 'CompiledName' attribute cannot be used with this language element - (Originally from FSComp.txt:609) - - - - - Cannot partially apply the extension method '%s' because the first parameter is a byref type. - (Originally from FSComp.txt:1514) - - - - - Cannot override inherited member '%s' because it is sealed - (Originally from FSComp.txt:1232) - - - - - Cannot inherit from a variable type - (Originally from FSComp.txt:607) - - - - - Cannot inherit a sealed type - (Originally from FSComp.txt:799) - - - - - Cannot inherit from interface type. Use interface ... with instead. - (Originally from FSComp.txt:800) - - - - - Cannot inherit from erased provided type - (Originally from FSComp.txt:1227) - - - - - Cannot create an extension of a sealed type - (Originally from FSComp.txt:628) - - - - - Cannot call the byref extension method '%s. 'this' parameter requires the value to be mutable or a non-readonly byref type. - (Originally from FSComp.txt:1512) - - - - - Cannot call an abstract base member: '%s' - (Originally from FSComp.txt:1085) - - - - - '%s' must be applied to an argument of type '%s', but has been applied to an argument of type '%s' - (Originally from FSComp.txt:1127) - - - - - '%s' can only be applied to optional arguments - (Originally from FSComp.txt:1128) - - - - - Byref types are not allowed to have optional type extensions. - (Originally from FSComp.txt:1513) - - - - - A byref pointer returned by a function or method is implicitly dereferenced as of F# 4.5. To acquire the return value as a pointer, use the address-of operator, e.g. '&f(x)' or '&obj.Method(arg1, arg2)'. - (Originally from FSComp.txt:1501) - - - - - A type annotated with IsByRefLike must also be a struct. Consider adding the [<Struct>] attribute to the type. - (Originally from FSComp.txt:1502) - - - - - This expression uses a built-in implicit conversion to convert type '%s' to type '%s'. See https://aka.ms/fsharp-implicit-convs. - (Originally from FSComp.txt:1636) - - - - - A binding cannot be marked both 'use' and 'rec' - (Originally from FSComp.txt:676) - - - - - 'let!', 'use!' and 'do!' expressions may not be used in queries - (Originally from FSComp.txt:1314) - - - - - '%s' must be followed by a variable name. Usage: %s. - (Originally from FSComp.txt:1267) - - - - - '%s' must come after a 'for' selection clause and be followed by the rest of the query. Syntax: ... %s ... - (Originally from FSComp.txt:1269) - - - - - 'member val' definitions are only permitted in types with a primary constructor. Consider adding arguments to your type definition, e.g. 'type X(args) = ...'. - (Originally from FSComp.txt:1305) - - - - - Attributes cannot be applied to type extensions. - (Originally from FSComp.txt:1519) - - - - - The attributes of this type specify multiple kinds for the type - (Originally from FSComp.txt:776) - - - - - Attributes are not allowed within patterns - (Originally from FSComp.txt:539) - - - - - Attributes are not permitted on 'let' bindings in expressions - (Originally from FSComp.txt:678) - - - - - 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. - (Originally from FSComp.txt:695) - - - - - This attribute is not valid for use on this language element - (Originally from FSComp.txt:696) - - - - - Attribute expressions must be calls to object constructors - (Originally from FSComp.txt:703) - - - - - The attribute 'AutoOpen(\"%s\")' in the assembly '%s' did not refer to a valid module or namespace in that assembly and has been ignored - (Originally from FSComp.txt:820) - - - - - The attribute '%s' appears in both the implementation and the signature, but the attribute arguments differ. Only the attribute from the signature will be included in the compiled code. - (Originally from FSComp.txt:1084) - - - - - At least one override did not correctly implement its corresponding abstract member - (Originally from FSComp.txt:638) - - - - - The member '%s' does not accept the correct number of arguments. One overload accepts %d arguments, but %d were given. The required signature is '%s'.%s - (Originally from FSComp.txt:624) - - - - - The member '%s' does not accept the correct number of arguments. %d argument(s) are expected, but %d were given. The required signature is '%s'.%s - (Originally from FSComp.txt:623) - - - - - Anonymous unit-of-measure cannot be nested inside another unit-of-measure expression - (Originally from FSComp.txt:568) - - - - - Anonymous type variables are not permitted in this declaration - (Originally from FSComp.txt:569) - - - - - The field '%s' appears multiple times in this anonymous record type. - (Originally from FSComp.txt:1678) - - - - - This anonymous record has an extra field. Remove field '%s'. - (Originally from FSComp.txt:1400) - - - - - This anonymous record is missing field '%s'. - (Originally from FSComp.txt:1398) - - - - - This anonymous record should have field '%s' but here has field '%s'. - (Originally from FSComp.txt:1402) - - - - - This anonymous record should have field '%s' but here has fields %s. - (Originally from FSComp.txt:1403) - - - - - This anonymous record has extra fields. Remove fields %s. - (Originally from FSComp.txt:1401) - - - - - This anonymous record is missing fields %s. - (Originally from FSComp.txt:1399) - - - - - This anonymous record should have fields %s; but here has field '%s'. - (Originally from FSComp.txt:1404) - - - - - This anonymous record should have fields %s; but here has fields %s. - (Originally from FSComp.txt:1405) - - - - - Invalid Anonymous Record type declaration. - (Originally from FSComp.txt:1395) - - - - - This anonymous record does not exactly match the expected shape. Add the missing fields %s and remove the extra fields %s. - (Originally from FSComp.txt:1397) - - - - - The field '%s' appears multiple times in this record expression. - (Originally from FSComp.txt:1677) - - - - - Two anonymous record types are from different assemblies '%s' and '%s' - (Originally from FSComp.txt:1396) - - - - - This feature is not supported in this version of F#. You may need to add /langversion:preview to use this feature. - (Originally from FSComp.txt:1530) - - - - - This expression has type '%s' and is only made compatible with type '%s' through an ambiguous implicit conversion. Consider using an explicit call to 'op_Implicit'. The applicable implicit conversions are:%s - (Originally from FSComp.txt:1634) - - - - - The meaning of _ is ambiguous here. It cannot be used for a discarded variable and a function shorthand in the same scope. - (Originally from FSComp.txt:1716) - - - - - Types with the 'AllowNullLiteral' attribute may only inherit from or implement types which also allow the use of the null literal - (Originally from FSComp.txt:784) - - - - - All implemented interfaces should be declared on the initial declaration of the type - (Originally from FSComp.txt:759) - - - - - Active patterns do not have fields. This syntax is invalid. - (Originally from FSComp.txt:1349) - - - - - 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. - (Originally from FSComp.txt:613) - - - - - This property overrides or implements an abstract property but the abstract property doesn't have a corresponding %s - (Originally from FSComp.txt:714) - - - - - Abstract members are not permitted in an augmentation - they must be defined as part of the type itself - (Originally from FSComp.txt:707) - - - - - Abbreviations for Common IL exception types must have a matching object constructor - (Originally from FSComp.txt:772) - - - - - Abbreviations for Common IL exceptions cannot take arguments - (Originally from FSComp.txt:770) - - - - - Abbreviated types cannot be given the 'Sealed' attribute - (Originally from FSComp.txt:798) - - - - - F# supports array ranks between 1 and 32. The value %d is not allowed. - (Originally from FSComp.txt:1309) - - - - - A value must be mutable in order to mutate the contents or take the address of a value type, e.g. 'let mutable x = ...' - (Originally from FSComp.txt:94) - - - - - A value defined in a module must be mutable in order to take its address, e.g. 'let mutable x = ...' - (Originally from FSComp.txt:1505) - - - - - The value has been copied to ensure the original is not mutated by this operation or because the copy is implicit when returning a struct from a member and another member is then accessed - (Originally from FSComp.txt:96) - - - - - This value does not have a valid property setter type - (Originally from FSComp.txt:90) - - - - - Unexpected decode of InternalsVisibleToAttribute - (Originally from FSComp.txt:101) - - - - - Unexpected decode of InterfaceDataVersionAttribute - (Originally from FSComp.txt:102) - - - - - Unexpected decode of AutoOpenAttribute - (Originally from FSComp.txt:100) - - - - - Unexpected use of a byref-typed variable - (Originally from FSComp.txt:93) - - - - - The module/namespace '%s' from compilation unit '%s' did not contain the val '%s' - (Originally from FSComp.txt:1079) - - - - - The module/namespace '%s' from compilation unit '%s' did not contain the namespace, module or type '%s' - (Originally from FSComp.txt:1080) - - - - - The module/namespace '%s' from compilation unit '%s' did not contain the module/namespace '%s' - (Originally from FSComp.txt:1078) - - - - - The type/module '%s' is not a concrete module or type - (Originally from FSComp.txt:82) - - - - - The type '%s' has an inline assembly code representation - (Originally from FSComp.txt:83) - - - - - Two modules named '%s' occur in two parts of this assembly - (Originally from FSComp.txt:86) - - - - - Recursively defined values cannot appear directly as part of the construction of a tuple value within a recursive binding - (Originally from FSComp.txt:97) - - - - - Recursive values cannot be directly assigned to the non-mutable field '%s' of the type '%s' within a recursive binding. Consider using a mutable field instead. - (Originally from FSComp.txt:99) - - - - - Recursive values cannot appear directly as a construction of the type '%s' within a recursive binding. This feature has been removed from the F# language. Consider using a record instead. - (Originally from FSComp.txt:98) - - - - - This is not a valid constant expression or custom attribute value - (Originally from FSComp.txt:104) - - - - - A namespace and a module named '%s' both occur in two parts of this assembly - (Originally from FSComp.txt:85) - - - - - Invalid mutation of a constant expression. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...'. - (Originally from FSComp.txt:95) - - - - - Invalid member signature encountered because of an earlier error - (Originally from FSComp.txt:89) - - - - - Invalid form for a property setter. At least one argument is required. - (Originally from FSComp.txt:92) - - - - - Invalid form for a property getter. At least one '()' argument is required when using the explicit syntax. - (Originally from FSComp.txt:91) - - - - - This operation accesses a mutable top-level value defined in another assembly in an unsupported way. The value cannot be accessed through its address. Consider copying the expression to a mutable local, e.g. 'let mutable x = ...', and if necessary assigning the value back after the completion of the operation - (Originally from FSComp.txt:1074) - - - - - Two type definitions named '%s' occur in namespace '%s' in two parts of this assembly - (Originally from FSComp.txt:87) - - - - - This literal expression or attribute argument results in an arithmetic overflow. - (Originally from FSComp.txt:1354) - - - - - A module and a type definition named '%s' occur in namespace '%s' in two parts of this assembly - (Originally from FSComp.txt:88) - - - - - Cannot take the address of the value returned from the expression. Assign the returned value to a let-bound value before taking the address. - (Originally from FSComp.txt:1511) - - - - - Active patterns cannot return more than 7 possibilities - (Originally from FSComp.txt:103) - - - - - (Suggested name) - (Originally from FSComp.txt:968) - - - - - The struct or class field '%s' is not accessible from this code location - (Originally from FSComp.txt:977) - - - - - Source file is too large to embed in a portable PDB - (Originally from FSComp.txt:873) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - The .NET SDK for this script could not be determined. If the script is in a directory using a 'global.json' then ensure the relevant .NET SDK is installed. Unexpected error '%s'. - (Originally from FSComp.txt:1631) - - - - - The .NET SDK for this script could not be determined. dotnet.exe could not be found ensure a .NET SDK is installed. - (Originally from FSComp.txt:1632) - - - - - The .NET SDK for this script could not be determined. If the script is in a directory using a 'global.json' then ensure the relevant .NET SDK is installed. The output from '%s --version' in the directory '%s' was: '%s' and the exit code was '%d'. - (Originally from FSComp.txt:1630) - - - - - Consider using 'return!' instead of 'return'. - (Originally from FSComp.txt:37) - - - - - This state machine is not statically compilable and no alternative is available. %s. Use an 'if __useResumableCode then <state-machine> else <alternative>' to give an alternative. - (Originally from FSComp.txt:1659) - - - - - This state machine is not statically compilable. %s. An alternative dynamic implementation will be used, which may be slower. Consider adjusting your code to ensure this state machine is statically compilable, or else suppress this warning. - (Originally from FSComp.txt:1658) - - - - - The state machine has an unexpected form - (Originally from FSComp.txt:1671) - - - - - The resumable code value(s) '%s' does not have a definition - (Originally from FSComp.txt:1669) - - - - - A resumable code invocation at '%s' could not be reduced - (Originally from FSComp.txt:1662) - - - - - A delegate or function producing resumable code in a state machine has type parameters - (Originally from FSComp.txt:1670) - - - - - A try/finally may not contain resumption points - (Originally from FSComp.txt:1666) - - - - - The 'with' block of a try/with may not contain resumption points - (Originally from FSComp.txt:1667) - - - - - A 'let rec' occured in the resumable code specification - (Originally from FSComp.txt:1663) - - - - - A fast integer for loop may not contain resumption points - (Originally from FSComp.txt:1668) - - - - - A target label for __resumeAt was not statically determined. A __resumeAt with a non-static target label may only appear at the start of a resumable code method - (Originally from FSComp.txt:1665) - - - - - A constrained generic construct occured in the resumable code specification - (Originally from FSComp.txt:1664) - - - - - Replace with '%s' - (Originally from FSComp.txt:20) - - - - - Recursive class hierarchy in type '%s' - (Originally from FSComp.txt:969) - - - - - A ReadOnly attribute has been applied to a struct type with a mutable field. - (Originally from FSComp.txt:1500) - - - - - Unexpected token '%s' in preprocessor expression - (Originally from FSComp.txt:1361) - - - - - Missing token '%s' in preprocessor expression - (Originally from FSComp.txt:1363) - - - - - Incomplete preprocessor expression - (Originally from FSComp.txt:1362) - - - - - Unexpected character '%s' in preprocessor expression - (Originally from FSComp.txt:1360) - - - - - Expected single line comment or end of line - (Originally from FSComp.txt:1054) - - - - - #i is not supported by the registered PackageManagers - (Originally from FSComp.txt:1528) - - - - - An error occurred while reading the F# metadata of assembly '%s'. A reserved construct was utilized. You may need to upgrade your F# compiler or use an earlier version of the assembly that doesn't make use of a specific construct. - (Originally from FSComp.txt:1494) - - - - - An error occurred while reading the F# metadata node at position %d in table '%s' of assembly '%s'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using. - (Originally from FSComp.txt:1364) - - - - - Newly added pickle state cannot be used in FSharp.Core, since it must be working in older compilers+tooling as well. The time window is at least 3 years after feature introduction. Violation: %s . Context: \n %s - (Originally from FSComp.txt:1721) - - - - - Error reading/writing metadata for the F# compiled DLL '%s'. Was the DLL compiled with an earlier version of the F# compiler? (error: '%s'). - (Originally from FSComp.txt:81) - - - - - A pattern match guard must be of type 'bool', but this 'when' expression is of type '%s'. - (Originally from FSComp.txt:33) - - - - - Problem with filename '%s': Illegal characters in path. - (Originally from FSComp.txt:1170) - - - - - Partial active patterns may only generate one result - (Originally from FSComp.txt:987) - - - - - Missing variable '%s' - (Originally from FSComp.txt:986) - - - - - Missing 'do' in 'while' expression. Expected 'while <expr> do <expr>'. - (Originally from FSComp.txt:1293) - - - - - Accessibility modifiers are not permitted on an 'inherits' declaration - (Originally from FSComp.txt:433) - - - - - Accessibility modifiers should come immediately prior to the identifier naming a construct - (Originally from FSComp.txt:404) - - - - - 'use' bindings are not permitted in modules and are treated as 'let' bindings - (Originally from FSComp.txt:397) - - - - - 'use' bindings are not permitted in primary constructors - (Originally from FSComp.txt:396) - - - - - Unmatched 'with' or badly formatted 'with' block - (Originally from FSComp.txt:420) - - - - - Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use!' keyword. - (Originally from FSComp.txt:1291) - - - - - Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'use' keyword. - (Originally from FSComp.txt:1292) - - - - - Unmatched '(' - (Originally from FSComp.txt:446) - - - - - Incomplete value definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let!' keyword. - (Originally from FSComp.txt:1290) - - - - - Incomplete value or function definition. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword. - (Originally from FSComp.txt:1289) - - - - - Unmatched '[<'. Expected closing '>]' - (Originally from FSComp.txt:1273) - - - - - Unmatched 'class', 'interface' or 'struct' - (Originally from FSComp.txt:418) - - - - - Unmatched '[|' - (Originally from FSComp.txt:462) - - - - - Unmatched '[' - (Originally from FSComp.txt:457) - - - - - Unmatched '{|' - (Originally from FSComp.txt:464) - - - - - Unmatched '{' - (Originally from FSComp.txt:463) - - - - - Unmatched 'begin' or 'struct' - (Originally from FSComp.txt:411) - - - - - Unmatched 'begin' - (Originally from FSComp.txt:423) - - - - - Unmatched '%s' - (Originally from FSComp.txt:461) - - - - - Accessibility modifiers are not permitted on union cases. Use 'type U = internal ...' or 'type U = private ...' to give an accessibility to the whole representation. - (Originally from FSComp.txt:441) - - - - - Unexpected token '%s' or incomplete expression - (Originally from FSComp.txt:1329) - - - - - Accessibility modifiers are not permitted here, but '%s' was given. - (Originally from FSComp.txt:402) - - - - - Unexpected symbol '=' in expression. Did you intend to use 'for x in y .. z do' instead? - (Originally from FSComp.txt:1394) - - - - - Unexpected symbol '.' in member definition. Expected 'with', '=' or other token. - (Originally from FSComp.txt:40) - - - - - A semicolon is not expected at this point - (Originally from FSComp.txt:400) - - - - - Unexpected quotation operator '<@' in type definition. If you intend to pass a verbatim string as a static argument to a type provider, put a space between the '<' and '@' characters. - (Originally from FSComp.txt:1124) - - - - - Unexpected infix operator in unit-of-measure expression. Legal operators are '*', '/' and '^'. - (Originally from FSComp.txt:472) - - - - - Unexpected integer literal in unit-of-measure expression - (Originally from FSComp.txt:473) - - - - - Unexpected infix operator in type expression - (Originally from FSComp.txt:469) - - - - - Unexpected identifier: '%s' - (Originally from FSComp.txt:440) - - - - - Unexpected end of input in 'match' or 'try' expression - (Originally from FSComp.txt:1278) - - - - - Unexpected end of input in 'while' expression. Expected 'while <expr> do <expr>'. - (Originally from FSComp.txt:1276) - - - - - Unexpected end of input in type signature - (Originally from FSComp.txt:1283) - - - - - Unexpected end of input in type definition - (Originally from FSComp.txt:1284) - - - - - Unexpected end of input in type arguments - (Originally from FSComp.txt:1282) - - - - - Unexpected end of input in 'try' expression. Expected 'try <expr> with <rules>' or 'try <expr> finally <expr>'. - (Originally from FSComp.txt:1275) - - - - - Unexpected end of input in 'then' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from FSComp.txt:1279) - - - - - Unexpected end of input in object members - (Originally from FSComp.txt:1285) - - - - - Unexpected end of input in 'match' expression. Expected 'match <expr> with | <pat> -> <expr> | <pat> -> <expr> ...'. - (Originally from FSComp.txt:1274) - - - - - Unexpected end of input in body of lambda expression. Expected 'fun <pat> ... <pat> -> <expr>'. - (Originally from FSComp.txt:1281) - - - - - Unexpected end of input in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. - (Originally from FSComp.txt:1277) - - - - - Unexpected end of input in expression - (Originally from FSComp.txt:1287) - - - - - Unexpected end of input in 'else' branch of conditional expression. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from FSComp.txt:1280) - - - - - Unexpected end of input in 'else if' or 'elif' branch of conditional expression. Expected 'elif <expr> then <expr>' or 'else if <expr> then <expr>'. - (Originally from FSComp.txt:1706) - - - - - Unexpected end of input in value, function or member definition - (Originally from FSComp.txt:1286) - - - - - Unexpected end of input - (Originally from FSComp.txt:401) - - - - - Unexpected empty type moduleDefn list - (Originally from FSComp.txt:413) - - - - - '_' cannot be used as field name - (Originally from FSComp.txt:1343) - - - - - _. shorthand syntax for lambda functions can only be used with atomic expressions. That means expressions with no whitespace unless enclosed in parentheses. - (Originally from FSComp.txt:1717) - - - - - Unclosed block - (Originally from FSComp.txt:410) - - - - - Type name cannot be empty. - (Originally from FSComp.txt:1331) - - - - - Type annotations on property getters and setters must be given after the 'get()' or 'set(v)', e.g. 'with get() : string = ...' - (Originally from FSComp.txt:426) - - - - - Accessibility modifiers are not permitted in this position for type abbreviations - (Originally from FSComp.txt:436) - - - - - The syntax 'module ... = struct .. end' is not used in F# code. Consider using 'module ... = begin .. end' - (Originally from FSComp.txt:482) - - - - - The syntax 'module ... : sig .. end' is not used in F# code. Consider using 'module ... = begin .. end' - (Originally from FSComp.txt:483) - - - - - Syntax error in labelled type argument - (Originally from FSComp.txt:468) - - - - - Syntax error - (Originally from FSComp.txt:416) - - - - - Successive patterns should be separated by spaces or tupled - (Originally from FSComp.txt:447) - - - - - Successive arguments should be separated by spaces or tupled, and arguments involving function or method applications should be parenthesized - (Originally from FSComp.txt:456) - - - - - A setter property may have at most two argument groups - (Originally from FSComp.txt:1071) - - - - - Property setters must be defined using 'set value = ', 'set idx value = ' or 'set (idx1,...,idxN) value = ... ' - (Originally from FSComp.txt:429) - - - - - Accessibility modifiers are not permitted on record fields. Use 'type R = internal ...' or 'type R = private ...' to give an accessibility to the whole representation. - (Originally from FSComp.txt:444) - - - - - In F# code you may use 'expr.[expr]'. A type annotation may be required to indicate the first expression is an array - (Originally from FSComp.txt:459) - - - - - At most one 'with' augmentation is permitted - (Originally from FSComp.txt:399) - - - - - Only '#' compiler directives may occur prior to the first 'namespace' declaration - (Originally from FSComp.txt:403) - - - - - Only class types may take value arguments - (Originally from FSComp.txt:422) - - - - - The use of the type syntax 'int C' and 'C <int>' is not permitted here. Consider adjusting this type to be written in the form 'C<int>' - (Originally from FSComp.txt:1077) - - - - - Remove spaces between the type name and type parameter, e.g. \"type C<'T>\", not type \"C <'T>\". Type parameters must be placed directly adjacent to the type name. - (Originally from FSComp.txt:1075) - - - - - Remove spaces between the type name and type parameter, e.g. \"C<'T>\", not \"C <'T>\". Type parameters must be placed directly adjacent to the type name. - (Originally from FSComp.txt:1076) - - - - - No matching 'in' found for this 'let' - (Originally from FSComp.txt:448) - - - - - No #endif found for #if or #else - (Originally from FSComp.txt:394) - - - - - No '=' symbol should follow a 'namespace' declaration - (Originally from FSComp.txt:481) - - - - - This member access is ambiguous. Please use parentheses around the object creation, e.g. '(new SomeType(args)).MemberName' - (Originally from FSComp.txt:1647) - - - - - Files should begin with either a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule', but not both. To define a module within a namespace use 'module SomeModule = ...' - (Originally from FSComp.txt:405) - - - - - To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. - (Originally from FSComp.txt:1307) - - - - - Property definitions may not be declared mutable. To indicate that this property can be set, use 'member val PropertyName = expr with get,set'. - (Originally from FSComp.txt:1306) - - - - - When the visibility for a property is specified, setting the visibility of the set or get method is not allowed. - (Originally from FSComp.txt:428) - - - - - The syntax '(typ,...,typ) ident' is not used in F# code. Consider using 'ident<typ,...,typ>' instead - (Originally from FSComp.txt:470) - - - - - A module name must be a simple name, not a path - (Originally from FSComp.txt:412) - - - - - A module abbreviation must be a simple name, not a path - (Originally from FSComp.txt:406) - - - - - Missing union case name - (Originally from FSComp.txt:1708) - - - - - Expected type argument or static argument - (Originally from FSComp.txt:1122) - - - - - Missing qualification after '.' - (Originally from FSComp.txt:458) - - - - - Expecting member body - (Originally from FSComp.txt:1713) - - - - - Missing keyword '%s' - (Originally from FSComp.txt:1714) - - - - - Unmatched '<'. Expected closing '>' - (Originally from FSComp.txt:1123) - - - - - Missing function body - (Originally from FSComp.txt:467) - - - - - Mismatched quotation, beginning with '%s' - (Originally from FSComp.txt:460) - - - - - Mismatched quotation operator name, beginning with '%s' - (Originally from FSComp.txt:475) - - - - - This member is not permitted in an object implementation - (Originally from FSComp.txt:466) - - - - - The declaration form 'let ... and ...' for non-recursive bindings is not used in F# code. Consider using a sequence of 'let' bindings - (Originally from FSComp.txt:445) - - - - - Invalid use of 'rec' keyword - (Originally from FSComp.txt:1383) - - - - - Invalid property getter or setter - (Originally from FSComp.txt:1072) - - - - - Invalid operator definition. Prefix operator definitions must use a valid prefix operator name. - (Originally from FSComp.txt:1100) - - - - - Invalid prefix operator - (Originally from FSComp.txt:1099) - - - - - Invalid literal in type - (Originally from FSComp.txt:471) - - - - - Invalid declaration syntax - (Originally from FSComp.txt:424) - - - - - Invalid anonymous record type - (Originally from FSComp.txt:1517) - - - - - Invalid anonymous record expression - (Originally from FSComp.txt:1516) - - - - - Interfaces always have the same visibility as the enclosing type - (Originally from FSComp.txt:430) - - - - - An integer for loop must use a simple identifier - (Originally from FSComp.txt:398) - - - - - Accessibility modifiers are not permitted on inline assembly code types - (Originally from FSComp.txt:439) - - - - - 'inherit' declarations cannot have 'as' bindings. To access members of the base class when overriding a method, the syntax 'base.SomeMember' may be used; 'base' is a keyword. Remove this 'as' binding. - (Originally from FSComp.txt:434) - - - - - An indexer property must be given at least one argument - (Originally from FSComp.txt:1073) - - - - - Incomplete operator expression (example a^b) or qualified type invocation (example: ^T.Name) - (Originally from FSComp.txt:480) - - - - - Incomplete character literal (example: 'Q') or qualified type invocation (example: 'T.Name) - (Originally from FSComp.txt:479) - - - - - Incomplete conditional. Expected 'if <expr> then <expr>' or 'if <expr> then <expr> else <expr>'. - (Originally from FSComp.txt:451) - - - - - 'in' or '=' expected - (Originally from FSComp.txt:454) - - - - - Neither 'member val' nor 'override val' definitions are permitted in object expressions. - (Originally from FSComp.txt:1341) - - - - - Denominator must not be 0 in unit-of-measure exponent - (Originally from FSComp.txt:478) - - - - - The '%s' visibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - (Originally from FSComp.txt:409) - - - - - The '%s' accessibility attribute is not allowed on module abbreviation. Module abbreviations are always private. - (Originally from FSComp.txt:408) - - - - - Ignoring attributes on module abbreviation - (Originally from FSComp.txt:407) - - - - - Identifier expected - (Originally from FSComp.txt:453) - - - - - A getter property is expected to be a function, e.g. 'get() = ...' or 'get(index) = ...' - (Originally from FSComp.txt:427) - - - - - A getter property may have at most one argument group - (Originally from FSComp.txt:1070) - - - - - 'get', 'set' or 'get,set' required - (Originally from FSComp.txt:421) - - - - - 'get' and/or 'set' required - (Originally from FSComp.txt:425) - - - - - Missing 'do' in 'for' expression. Expected 'for <pat> in <expr> do <expr>'. - (Originally from FSComp.txt:1294) - - - - - Field bindings must have the form 'id = expr;' - (Originally from FSComp.txt:465) - - - - - Expecting type - (Originally from FSComp.txt:1709) - - - - - Expecting pattern - (Originally from FSComp.txt:1689) - - - - - Expecting expression - (Originally from FSComp.txt:1679) - - - - - Expected a type after this point - (Originally from FSComp.txt:1272) - - - - - Expected a pattern after this point - (Originally from FSComp.txt:1690) - - - - - Unexpected end of type. Expected a name after this point. - (Originally from FSComp.txt:1288) - - - - - Expected an expression after this point - (Originally from FSComp.txt:1271) - - - - - The block following this '%s' is unfinished. Every code block is an expression and must have a result. '%s' cannot be the final code element in a block. Consider giving this block an explicit result. - (Originally from FSComp.txt:450) - - - - - Attempted to parse this as an operator name, but failed - (Originally from FSComp.txt:1125) - - - - - Error in the return expression for this 'let'. Possible incorrect indentation. - (Originally from FSComp.txt:449) - - - - - End of file in verbatim string embedded in comment begun at or before here - (Originally from FSComp.txt:391) - - - - - End of file in verbatim string begun at or before here - (Originally from FSComp.txt:388) - - - - - End of file in triple-quote string embedded in comment begun at or before here - (Originally from FSComp.txt:1120) - - - - - End of file in triple-quote string begun at or before here - (Originally from FSComp.txt:1119) - - - - - End of file in string embedded in comment begun at or before here - (Originally from FSComp.txt:390) - - - - - End of file in string begun at or before here - (Originally from FSComp.txt:387) - - - - - Incomplete interpolated verbatim string begun at or before here - (Originally from FSComp.txt:1626) - - - - - Incomplete interpolated triple-quote string begun at or before here - (Originally from FSComp.txt:1627) - - - - - Incomplete interpolated string expression fill begun at or before here - (Originally from FSComp.txt:1624) - - - - - Incomplete interpolated string begun at or before here - (Originally from FSComp.txt:1625) - - - - - End of file in IF-OCAML section begun at or before here - (Originally from FSComp.txt:392) - - - - - End of file in #if section begun at or after here - (Originally from FSComp.txt:386) - - - - - End of file in directive begun at or before here - (Originally from FSComp.txt:393) - - - - - End of file in comment begun at or before here - (Originally from FSComp.txt:389) - - - - - Accessibility modifiers are not permitted in this position for enum types - (Originally from FSComp.txt:437) - - - - - Accessibility modifiers are not permitted on enumeration fields - (Originally from FSComp.txt:442) - - - - - A type definition requires one or more members or other declarations. If you intend to define an empty class, struct or interface, then use 'type ... = class end', 'interface end' or 'struct end'. - (Originally from FSComp.txt:419) - - - - - Invalid interpolated string. This interpolated string expression fill is empty, an expression was expected. - (Originally from FSComp.txt:1628) - - - - - Accessibility modifiers are not permitted on 'do' bindings, but '%s' was given. - (Originally from FSComp.txt:385) - - - - - Constraint intersection syntax may only be used with flexible types, e.g. '#IDisposable & #ISomeInterface'. - (Originally from FSComp.txt:1719) - - - - - Consider using a separate record type instead - (Originally from FSComp.txt:443) - - - - - Augmentations are not permitted on delegate type moduleDefns - (Originally from FSComp.txt:417) - - - - - Attributes should be placed before 'val' - (Originally from FSComp.txt:414) - - - - - Attributes are not permitted on 'inherit' declarations - (Originally from FSComp.txt:432) - - - - - Attributes are not allowed here - (Originally from FSComp.txt:435) - - - - - Attributes have been ignored in this construct - (Originally from FSComp.txt:395) - - - - - Attributes are not permitted on interface implementations - (Originally from FSComp.txt:415) - - - - - Cannot find code target for this attribute, possibly because the code after the attribute is incomplete. - (Originally from FSComp.txt:1330) - - - - - 'assert' may not be used as a first class value. Use 'assert <expr>' instead. - (Originally from FSComp.txt:452) - - - - - 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. - (Originally from FSComp.txt:455) - - - - - All enum fields must be given values - (Originally from FSComp.txt:438) - - - - - Active pattern case identifiers must begin with an uppercase letter - (Originally from FSComp.txt:476) - - - - - The '|' character is not permitted in active pattern case identifiers - (Originally from FSComp.txt:477) - - - - - Accessibility modifiers are not allowed on this member. Abstract slots always have the same visibility as the enclosing type. - (Originally from FSComp.txt:431) - - - - - Package manager key '%s' was not registered in %s. Currently registered: %s. To learn more about extensions, visit: https://aka.ms/dotnetdepmanager - (Originally from FSComp.txt:842) - - - - - %s - (Originally from FSComp.txt:843) - - - - - The 'package management' feature requires language version 5.0 or above - (Originally from FSComp.txt:1526) - - - - - Write the xmldoc of the assembly to the given file - (Originally from FSComp.txt:854) - - - - - Specify a Win32 resource file (.res) - (Originally from FSComp.txt:866) - - - - - Specify a Win32 manifest file - (Originally from FSComp.txt:867) - - - - - Specify a Win32 icon file (.ico) - (Originally from FSComp.txt:865) - - - - - Report all warnings as errors - (Originally from FSComp.txt:886) - - - - - Report specific warnings as errors - (Originally from FSComp.txt:887) - - - - - Enable specific warnings that may be off by default - (Originally from FSComp.txt:890) - - - - - Set a warning level (0-5) - (Originally from FSComp.txt:888) - - - - - Display compiler version banner and exit - (Originally from FSComp.txt:896) - - - - - Output messages in UTF-8 encoding - (Originally from FSComp.txt:900) - - - - - Enable high-entropy ASLR - (Originally from FSComp.txt:927) - - - - - Unrecognized target '%s', expected 'exe', 'winexe', 'library' or 'module' - (Originally from FSComp.txt:937) - - - - - Unrecognized value '%s' for --langversion use --langversion:? for complete list - (Originally from FSComp.txt:84) - - - - - Unrecognized debug type '%s', expected 'pdbonly' or 'full' - (Originally from FSComp.txt:938) - - - - - Invalid value '%s' for --interfacedata, valid value are: none, file, compress. - (Originally from FSComp.txt:934) - - - - - Unrecognized platform '%s', valid values are 'x86', 'x64', 'Arm', 'Arm64', 'Itanium', 'anycpu32bitpreferred', and 'anycpu'. The default is anycpu. - (Originally from FSComp.txt:943) - - - - - Invalid value '%s' for --optimizationdata, valid value are: none, file, compress. - (Originally from FSComp.txt:936) - - - - - Algorithm '%s' is not supported - (Originally from FSComp.txt:944) - - - - - Unknown --test argument: '%s' - (Originally from FSComp.txt:942) - - - - - Specify target framework profile of this assembly. Valid values are mscorlib, netcore or netstandard. Default - mscorlib - (Originally from FSComp.txt:929) - - - - - Enable or disable tailcalls - (Originally from FSComp.txt:879) - - - - - Supported language versions: - (Originally from FSComp.txt:1540) - - - - - Specify subsystem version of this assembly - (Originally from FSComp.txt:928) - - - - - Specify a strong name key file - (Originally from FSComp.txt:855) - - - - - Specify a strong name key container - (Originally from FSComp.txt:856) - - - - - Override indentation rules implied by the language version - (Originally from FSComp.txt:1541) - - - - - 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. - (Originally from FSComp.txt:907) - - - - - Statically link the F# library and all referenced DLLs that depend on it into the assembly being generated - (Originally from FSComp.txt:906) - - - - - Source link information file to embed in the portable PDB file - (Originally from FSComp.txt:871) - - - - - Resolve assembly references using directory-based rules rather than MSBuild resolution - (Originally from FSComp.txt:910) - - - - - Include F# interface information, the default is file. Essential for distributing libraries. - (Originally from FSComp.txt:933) - - - - - Print the inferred interface of the assembly to a file - (Originally from FSComp.txt:861) - - - - - Short form of '%s' - (Originally from FSComp.txt:911) - - - - - Specify language version such as 'latest' or 'preview'. - (Originally from FSComp.txt:1539) - - - - - Response file '%s' not found in '%s' - (Originally from FSComp.txt:1372) - - - - - Response file name '%s' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long - (Originally from FSComp.txt:1373) - - - - - Read response file for more options - (Originally from FSComp.txt:897) - - - - - Embed the specified managed resource - (Originally from FSComp.txt:874) - - - - - Use a resident background compilation service to improve compiler startup times. - (Originally from FSComp.txt:908) - - - - - Disable implicit generation of constructs using reflection - (Originally from FSComp.txt:885) - - - - - Reference an assembly (Short form: -r) - (Originally from FSComp.txt:863) - - - - - Produce a reference assembly with the specified file path. - (Originally from FSComp.txt:882) - - - - - Produce a reference assembly, instead of a full assembly, as the primary output - (Originally from FSComp.txt:881) - - - - - Public-sign the assembly using only the public portion of the strong name key, and mark the assembly as signed - (Originally from FSComp.txt:853) - - - - - Problem with codepage '%d': %s - (Originally from FSComp.txt:844) - - - - - Specify the preferred output language culture name (e.g. es-ES, ja-JP) - (Originally from FSComp.txt:931) - - - - - Limit which platforms this code can run on: x86, x64, Arm, Arm64, Itanium, anycpu32bitpreferred, or anycpu. The default is anycpu. - (Originally from FSComp.txt:858) - - - - - The pdb output file name cannot match the build output filename use --pdb:filename.pdb - (Originally from FSComp.txt:872) - - - - - Name the output debug file - (Originally from FSComp.txt:909) - - - - - Maps physical paths to source path names output by the compiler - (Originally from FSComp.txt:883) - - - - - Enable optimizations (Short form: -O) - (Originally from FSComp.txt:878) - - - - - Specify included optimization information, the default is file. Important for distributed libraries. - (Originally from FSComp.txt:935) - - - - - Do not include the default Win32 manifest - (Originally from FSComp.txt:868) - - - - - Disable specific warning messages - (Originally from FSComp.txt:889) - - - - - Suppress compiler copyright message - (Originally from FSComp.txt:894) - - - - - Do not reference the default CLI assemblies by default - (Originally from FSComp.txt:905) - - - - - Only include optimization information essential for implementing inlined constructs. Inhibits cross-module inlining but improves binary compatibility. - (Originally from FSComp.txt:859) - - - - - Don't add a resource to the generated assembly containing F#-specific metadata - (Originally from FSComp.txt:860) - - - - - Don't copy FSharp.Core.dll along the produced binaries - (Originally from FSComp.txt:932) - - - - - Name of the output file (Short form: -o) - (Originally from FSComp.txt:847) - - - - - Ignore ML compatibility warnings - (Originally from FSComp.txt:893) - - - - - Link the specified resource to this assembly where the resinfo format is <file>[,<string name>[,public|private]] - (Originally from FSComp.txt:875) - - - - - Specify a directory for the include path which is used to resolve source files and assemblies (Short form: -I) - (Originally from FSComp.txt:902) - - - - - Invalid warning level '%d' - (Originally from FSComp.txt:939) - - - - - Invalid value '%s' for '--targetprofile', valid values are 'mscorlib', 'netcore' or 'netstandard'. - (Originally from FSComp.txt:941) - - - - - Invalid version '%s' for '--subsystemversion'. The version must be 4.00 or greater. - (Originally from FSComp.txt:940) - - - - - Invalid response file '%s' ( '%s' ) - (Originally from FSComp.txt:1371) - - - - - Invalid reference assembly path' - (Originally from FSComp.txt:1175) - - - - - Invalid use of emitting a reference assembly, do not use '--standalone or --staticlink' with '--refonly or --refout'. - (Originally from FSComp.txt:1176) - - - - - Invalid path map. Mappings must be comma separated and of the format 'path=sourcePath' - (Originally from FSComp.txt:1174) - - - - - The command-line option '%s' is for test purposes only - (Originally from FSComp.txt:922) - - - - - - RESOURCES - - (Originally from FSComp.txt:916) - - - - - - OUTPUT FILES - - (Originally from FSComp.txt:914) - - - - - - MISCELLANEOUS - - (Originally from FSComp.txt:919) - - - - - - LANGUAGE - - (Originally from FSComp.txt:920) - - - - - - INPUT FILES - - (Originally from FSComp.txt:915) - - - - - - ERRORS AND WARNINGS - - (Originally from FSComp.txt:921) - - - - - - CODE GENERATION - - (Originally from FSComp.txt:917) - - - - - - ADVANCED - - (Originally from FSComp.txt:918) - - - - - Display this usage message (Short form: -?) - (Originally from FSComp.txt:895) - - - - - Display the allowed values for language version. - (Originally from FSComp.txt:1538) - - - - - Output messages with fully qualified paths - (Originally from FSComp.txt:901) - - - - - Emit debug information in quotations - (Originally from FSComp.txt:930) - - - - - Embed specific source files in the portable PDB file - (Originally from FSComp.txt:870) - - - - - Embed all source files in the portable PDB file - (Originally from FSComp.txt:869) - - - - - Produce a deterministic assembly (including module version GUID and timestamp) - (Originally from FSComp.txt:880) - - - - - Delay-sign the assembly using only the public portion of the strong name key - (Originally from FSComp.txt:852) - - - - - Define conditional compilation symbols (Short form: -d) - (Originally from FSComp.txt:892) - - - - - Emit debug information (Short form: -g) - (Originally from FSComp.txt:876) - - - - - Specify debugging type: full, portable, embedded, pdbonly. ('%s' is the default if no debuggging type specified and enables attaching a debugger to a running program, 'portable' is a cross-platform format, 'embedded' is a cross-platform format embedded into the output file). - (Originally from FSComp.txt:877) - - - - - The command-line option '%s' has been deprecated - (Originally from FSComp.txt:923) - - - - - The command-line option '%s' has been deprecated. HTML document generation is now part of the F# Power Pack, via the tool FsHtmlDoc.exe. - (Originally from FSComp.txt:925) - - - - - The command-line option '%s' has been deprecated. Use '%s' instead. - (Originally from FSComp.txt:924) - - - - - Enable or disable cross-module optimizations - (Originally from FSComp.txt:884) - - - - - Freely distributed under the MIT Open Source License. https://github.com/Microsoft/visualfsharp/blob/master/License.txt - (Originally from FSComp.txt:846) - - - - - Copyright (c) Microsoft Corporation. All Rights Reserved. - (Originally from FSComp.txt:845) - - - - - Output warning and error messages in color - (Originally from FSComp.txt:926) - - - - - Compress interface and optimization data files - (Originally from FSComp.txt:857) - - - - - Reference an assembly or directory containing a design time tool (Short form: -t) - (Originally from FSComp.txt:864) - - - - - Specify the codepage used to read source files - (Originally from FSComp.txt:898) - - - - - Use to override where the compiler looks for mscorlib.dll and framework components - (Originally from FSComp.txt:913) - - - - - The command-line option '--cliroot' has been deprecated. Use an explicit reference to a specific copy of mscorlib.dll instead. - (Originally from FSComp.txt:912) - - - - - Clear the package manager results cache - (Originally from FSComp.txt:899) - - - - - Specify algorithm for calculating source file checksum stored in PDB. Supported values are: SHA1 or SHA256 (default) - (Originally from FSComp.txt:904) - - - - - Generate overflow checks - (Originally from FSComp.txt:891) - - - - - Build a Windows executable - (Originally from FSComp.txt:849) - - - - - Build a module that can be added to another assembly - (Originally from FSComp.txt:851) - - - - - Build a library (Short form: -a) - (Originally from FSComp.txt:850) - - - - - Build a console executable - (Originally from FSComp.txt:848) - - - - - Base address for the library to be built - (Originally from FSComp.txt:903) - - - - - Print the inferred interfaces of all compilation files to associated signature files - (Originally from FSComp.txt:862) - - - - - A value marked as 'inline' has an unexpected value - (Originally from FSComp.txt:996) - - - - - A value marked as 'inline' could not be inlined - (Originally from FSComp.txt:997) - - - - - The value '%s' was marked inline but was not bound in the optimization environment - (Originally from FSComp.txt:994) - - - - - The value '%s' was marked inline but its implementation makes use of an internal or private function which is not sufficiently accessible - (Originally from FSComp.txt:993) - - - - - Recursive ValValue %s - (Originally from FSComp.txt:999) - - - - - Local value %s not found during optimization - (Originally from FSComp.txt:995) - - - - - Failed to inline the value '%s' marked 'inline', perhaps because a recursive value was marked 'inline' - (Originally from FSComp.txt:998) - - - - - The value '%s' was marked 'InlineIfLambda' but was not determined to have a lambda value. This warning is for informational purposes only. - (Originally from FSComp.txt:1672) - - - - - The union type for union case '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the union type ('%s') in the name you are using. - (Originally from FSComp.txt:1013) - - - - - Unexpected empty long identifier - (Originally from FSComp.txt:1008) - - - - - Multiple types exist called '%s', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, e.g. '%s'. - (Originally from FSComp.txt:1004) - - - - - 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'. - (Originally from FSComp.txt:1005) - - - - - The record type for the record field '%s' was defined with the RequireQualifiedAccessAttribute. Include the name of the record type ('%s') in the name you are using. - (Originally from FSComp.txt:1014) - - - - - The record type '%s' does not contain a label '%s'. - (Originally from FSComp.txt:1009) - - - - - No constructors are available for the type '%s' - (Originally from FSComp.txt:1012) - - - - - This is not a constructor or literal, or a constructor is being used incorrectly - (Originally from FSComp.txt:1007) - - - - - Invalid module/expression/type - (Originally from FSComp.txt:1003) - - - - - Invalid field label - (Originally from FSComp.txt:1010) - - - - - Invalid expression '%s' - (Originally from FSComp.txt:1011) - - - - - 'global' may only be used as the first name in a qualified path - (Originally from FSComp.txt:1006) - - - - - This value is not a function and cannot be applied. Did you intend to access the indexer via '%s[index]'? - (Originally from FSComp.txt:1490) - - - - - This value is not a function and cannot be applied. Did you intend to access the indexer via '%s.[index]'? - (Originally from FSComp.txt:1488) - - - - - (Originally from FSComp.txt:1492) - - - - - This expression is not a function and cannot be applied. Did you intend to access the indexer via 'expr[index]'? - (Originally from FSComp.txt:1491) - - - - - This expression is not a function and cannot be applied. Did you intend to access the indexer via 'expr.[index]'? - (Originally from FSComp.txt:1489) - - - - - This value is not a function and cannot be applied. Did you forget to terminate a declaration? - (Originally from FSComp.txt:1493) - - - - - This value is not a function and cannot be applied. - (Originally from FSComp.txt:1487) - - - - - No Invoke methods found for delegate type - (Originally from FSComp.txt:979) - - - - - Files in libraries or multiple-file applications must begin with a namespace or module declaration. When using a module declaration at the start of a file the '=' sign is not allowed. If this is a top-level module, consider removing the = to resolve this error. - (Originally from FSComp.txt:58) - - - - - + %d overloads - (Originally from FSComp.txt:1327) - - - - - + 1 overload - (Originally from FSComp.txt:1326) - - - - - Resource header beginning at offset %s is malformed. - (Originally from FSComp.txt:1543) - - - - - Stream does not begin with a null resource and is not in '.RES' format. - (Originally from FSComp.txt:1542) - - - - - More than one Invoke method found for delegate type - (Originally from FSComp.txt:980) - - - - - The use of 'module M = struct ... end ' was deprecated in F# 2.0 and is no longer supported. Remove the 'struct' and 'end' and use indentation instead - (Originally from FSComp.txt:1096) - - - - - The use of 'module M = sig ... end ' was deprecated in F# 2.0 and is no longer supported. Remove the 'sig' and 'end' and use indentation instead - (Originally from FSComp.txt:1094) - - - - - The use of 'module M: sig ... end ' was deprecated in F# 2.0 and is no longer supported. Change the ':' to an '=' and remove the 'sig' and 'end' and use indentation instead - (Originally from FSComp.txt:1093) - - - - - The use of multiple parenthesized type parameters before a generic type name such as '(int, int) Map' was deprecated in F# 2.0 and is no longer supported - (Originally from FSComp.txt:1095) - - - - - This construct is for ML compatibility. %s. You can disable this warning by using '--mlcompatibility' or '--nowarn:62'. - (Originally from FSComp.txt:1089) - - - - - The use of '#light \"off\"' or '#indent \"off\"' was deprecated in F# 2.0 and is no longer supported - (Originally from FSComp.txt:1092) - - - - - In previous versions of F# '%s' was a reserved keyword but the use of this keyword is now deprecated - (Originally from FSComp.txt:1091) - - - - - This construct is deprecated. %s. You can enable this feature by using '--langversion:5.0' and '--mlcompatibility'. - (Originally from FSComp.txt:1090) - - - - - This 'if' expression is missing an 'else' branch. Because 'if' is an expression, and not a statement, add an 'else' branch which also returns a value of type '%s'. - (Originally from FSComp.txt:26) - - - - - Method or object constructor '%s' is not static - (Originally from FSComp.txt:1393) - - - - - Infix operator member '%s' has %d initial argument(s). Expected a tuple of 3 arguments - (Originally from FSComp.txt:1338) - - - - - Infix operator member '%s' has %d initial argument(s). Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from FSComp.txt:1056) - - - - - Infix operator member '%s' has no arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from FSComp.txt:1055) - - - - - Infix operator member '%s' has extra curried arguments. Expected a tuple of 2 arguments, e.g. static member (+) (x,y) = ... - (Originally from FSComp.txt:1057) - - - - - Pattern discard is not allowed for union case that takes no data. - (Originally from FSComp.txt:1691) - - - - - (loading description...) - (Originally from FSComp.txt:1334) - - - - - All elements of a list must be implicitly convertible to the type of the first element, which here is a tuple of length %d of type\n %s \nThis element is a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:23) - - - - - All elements of a list must be implicitly convertible to the type of the first element, which here is '%s'. This element has type '%s'. - (Originally from FSComp.txt:22) - - - - - Identifiers containing '@' are reserved for use in F# code generation - (Originally from FSComp.txt:984) - - - - - The identifier '%s' is reserved for future use by F# - (Originally from FSComp.txt:985) - - - - - Unexpected syntax or possible incorrect indentation: this token is offside of context started at position %s. Try indenting this further.\nTo continue using non-conforming indentation, pass the '--strict-indentation-' flag to the compiler, or set the language version to F# 7. - (Originally from FSComp.txt:1001) - - - - - The '|' tokens separating rules of this pattern match are misaligned by one column. Consider realigning your code or using further indentation. - (Originally from FSComp.txt:1002) - - - - - The indentation of this 'in' token is incorrect with respect to the corresponding 'let' - (Originally from FSComp.txt:1000) - - - - - Syntax error. Wrong nested #endif, unexpected tokens before it. - (Originally from FSComp.txt:1052) - - - - - The interpolated string contains unmatched closing braces. - (Originally from FSComp.txt:1130) - - - - - Unexpected character '%s' - (Originally from FSComp.txt:1021) - - - - - Invalid interpolated string. Triple quote string literals may not be used in interpolated expressions. Consider using an explicit 'let' binding for the interpolation expression. - (Originally from FSComp.txt:1621) - - - - - The interpolated triple quoted string literal does not start with enough '$' characters to allow this many consecutive '%%' characters. - (Originally from FSComp.txt:1131) - - - - - The interpolated triple quoted string literal does not start with enough '$' characters to allow this many consecutive opening braces as content. - (Originally from FSComp.txt:1129) - - - - - This token is reserved for future use - (Originally from FSComp.txt:1042) - - - - - This Unicode encoding is only valid in string literals - (Originally from FSComp.txt:1041) - - - - - TABs are not allowed in F# code unless the #indent \"off\" option is used - (Originally from FSComp.txt:1043) - - - - - Invalid interpolated string. Single quote or verbatim string literals may not be used in interpolated expressions in single quote or verbatim strings. Consider using an explicit 'let' binding for the interpolation expression or use a triple quote string as the outer string literal. - (Originally from FSComp.txt:1620) - - - - - A '}' character must be escaped (by doubling) in an interpolated string. - (Originally from FSComp.txt:1629) - - - - - This number is outside the allowable range for 32-bit unsigned integers - (Originally from FSComp.txt:1030) - - - - - This number is outside the allowable range for 32-bit signed integers - (Originally from FSComp.txt:1029) - - - - - This number is outside the allowable range for 64-bit unsigned integers - (Originally from FSComp.txt:1032) - - - - - This number is outside the allowable range for 64-bit signed integers - (Originally from FSComp.txt:1031) - - - - - This number is outside the allowable range for 16-bit unsigned integers - (Originally from FSComp.txt:1028) - - - - - This number is outside the allowable range for 16-bit signed integers - (Originally from FSComp.txt:1027) - - - - - This number is outside the allowable range for unsigned native integers - (Originally from FSComp.txt:1034) - - - - - This number is outside the allowable range for signed native integers - (Originally from FSComp.txt:1033) - - - - - This number is outside the allowable range for this integer type - (Originally from FSComp.txt:1016) - - - - - This number is outside the allowable range for 8-bit unsigned integers - (Originally from FSComp.txt:1026) - - - - - This number is outside the allowable range for hexadecimal 8-bit signed integers - (Originally from FSComp.txt:1025) - - - - - This number is outside the allowable range for 8-bit signed integers - (Originally from FSComp.txt:1024) - - - - - This number is outside the allowable range for 32-bit floats - (Originally from FSComp.txt:1037) - - - - - This number is outside the allowable range for decimal literals - (Originally from FSComp.txt:1036) - - - - - \U%s is not a valid Unicode character escape sequence - (Originally from FSComp.txt:1126) - - - - - This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0o1, 0b1, 1l (int/int32), 1u (uint/uint32), 1L (int64), 1UL (uint64), 1s (int16), 1us (uint16), 1y (int8/sbyte), 1uy (uint8/byte), 1.0 (float/double), 1.0f (float32/single), 1.0m (decimal), 1I (bigint). - (Originally from FSComp.txt:1038) - - - - - Invalid line number: '%s' - (Originally from FSComp.txt:1044) - - - - - This is not a valid identifier - (Originally from FSComp.txt:1707) - - - - - Invalid floating point number - (Originally from FSComp.txt:1035) - - - - - This is not a valid character literal - (Originally from FSComp.txt:1040) - - - - - This is not a valid byte literal - (Originally from FSComp.txt:1039) - - - - - Consider using a file with extension '.ml' or '.mli' instead - (Originally from FSComp.txt:1102) - - - - - IF-FSHARP/IF-CAML regions are no longer supported - (Originally from FSComp.txt:1103) - - - - - Identifiers followed by '%s' are reserved for future use - (Originally from FSComp.txt:1023) - - - - - #if directive should be immediately followed by an identifier - (Originally from FSComp.txt:1051) - - - - - #if directive must appear as the first non-whitespace character on a line - (Originally from FSComp.txt:1045) - - - - - #endif has no matching #if - (Originally from FSComp.txt:1049) - - - - - #endif required for #else - (Originally from FSComp.txt:1047) - - - - - #endif directive must appear as the first non-whitespace character on a line - (Originally from FSComp.txt:1050) - - - - - #else has no matching #if - (Originally from FSComp.txt:1046) - - - - - #else directive must appear as the first non-whitespace character on a line - (Originally from FSComp.txt:1048) - - - - - #! may only appear as the first line at the start of a file. - (Originally from FSComp.txt:1053) - - - - - Extended string interpolation is not supported in this version of F#. - (Originally from FSComp.txt:1132) - - - - - '%s' is not permitted as a character in operator names and is reserved for future use - (Originally from FSComp.txt:1020) - - - - - a byte string may not be interpolated - (Originally from FSComp.txt:1623) - - - - - This byte array literal contains characters that do not encode as a single byte - (Originally from FSComp.txt:1022) - - - - - Used in a computation expression to append the result of a given computation expression to a collection of results for the containing computation expression. - (Originally from FSComp.txt:1477) - - - - - Used in a sequence expression to produce a value for a sequence. - (Originally from FSComp.txt:1476) - - - - - Used together with the match keyword in pattern matching expressions. Also used in object expressions, record copying expressions, and type extensions to introduce member definitions, and to introduce exception handlers. - (Originally from FSComp.txt:1475) - - - - - Used in computation expressions to introduce a looping construct where the condition is the result of another computation expression. - (Originally from FSComp.txt:1474) - - - - - Introduces a looping construct. - (Originally from FSComp.txt:1473) - - - - - Used for Boolean conditions (when guards) on pattern matches and to introduce a constraint clause for a generic type parameter. - (Originally from FSComp.txt:1472) - - - - - Indicates the .NET void type. Used when interoperating with other .NET languages. - (Originally from FSComp.txt:1471) - - - - - Used in a signature to indicate a value, or in a type to declare a member, in limited situations. - (Originally from FSComp.txt:1470) - - - - - Used instead of let! in computation expressions for computation expression results that implement IDisposable. - (Originally from FSComp.txt:1469) - - - - - Used instead of let for values that implement IDisposable - (Originally from FSComp.txt:1468) - - - - - Used to convert to a type that is higher in the inheritance chain. - (Originally from FSComp.txt:1467) - - - - - Delimits a untyped code quotation. - (Originally from FSComp.txt:1483) - - - - - Delimits a typed code quotation. - (Originally from FSComp.txt:1482) - - - - - Used to check if an object is of the given type in a pattern or binding. - (Originally from FSComp.txt:1466) - - - - - Used to declare a class, record, structure, discriminated union, enumeration type, unit of measure, or type abbreviation. - (Originally from FSComp.txt:1465) - - - - - Used to introduce a block of code that might generate an exception. Used together with with or finally. - (Originally from FSComp.txt:1464) - - - - - Used as a Boolean literal. - (Originally from FSComp.txt:1425) - - - - - Used in for loops to indicate a range. - (Originally from FSComp.txt:1463) - - - - - Used in conditional expressions. Also used to perform side effects after object construction. - (Originally from FSComp.txt:1462) - - - - - Used to declare a structure type. Also used in generic parameter constraints. - (Originally from FSComp.txt:1461) - - - - - Used to indicate a method or property that can be called without an instance of a type, or a value member that is shared among all instances of a type. - (Originally from FSComp.txt:1460) - - - - - Keyword reserved for ML-compatibility. - (Originally from FSComp.txt:1459) - - - - - Used in query expressions to specify what fields or columns to extract. Note that this is a contextual keyword, which means that it is not actually a reserved word and it only acts like a keyword in appropriate context. - (Originally from FSComp.txt:1458) - - - - - In function types, delimits arguments and return values. Yields an expression (in sequence expressions); equivalent to the yield keyword. Used in match expressions - (Originally from FSComp.txt:1478) - - - - - Used to provide a value for the result of the containing computation expression, where that value itself comes from the result another computation expression. - (Originally from FSComp.txt:1457) - - - - - Used to provide a value for the result of the containing computation expression. - (Originally from FSComp.txt:1456) - - - - - Used to indicate that a function is recursive. - (Originally from FSComp.txt:1455) - - - - - Allows access to a member from outside the type. - (Originally from FSComp.txt:1454) - - - - - Restricts access to a member to code in the same type or module. - (Originally from FSComp.txt:1453) - - - - - Used to implement a version of an abstract or virtual method that differs from the base version. - (Originally from FSComp.txt:1452) - - - - - Used with Boolean conditions as a Boolean or operator. Equivalent to ||. Also used in member constraints. - (Originally from FSComp.txt:1451) - - - - - Used to make the contents of a namespace or module available without qualification. - (Originally from FSComp.txt:1450) - - - - - Used in discriminated unions to indicate the type of categories of values, and in delegate and exception declarations. - (Originally from FSComp.txt:1449) - - - - - Indicates the absence of an object. Also used in generic parameter constraints. - (Originally from FSComp.txt:1448) - - - - - Not actually a keyword. However, not struct in combination is used as a generic parameter constraint. - (Originally from FSComp.txt:1447) - - - - - Used to declare, define, or invoke a constructor that creates or that can create an object. Also used in generic parameter constraints to indicate that a type must have a certain constructor. - (Originally from FSComp.txt:1446) - - - - - Used to associate a name with a group of related types and modules, to logically separate it from other code. - (Originally from FSComp.txt:1445) - - - - - Used to declare a variable, that is, a value that can be changed. - (Originally from FSComp.txt:1444) - - - - - Used to associate a name with a group of related types, values, and functions, to logically separate it from other code. - (Originally from FSComp.txt:1443) - - - - - Used to declare a property or method in an object type. - (Originally from FSComp.txt:1442) - - - - - Used in computation expressions to pattern match directly over the result of another computation expression. - (Originally from FSComp.txt:1441) - - - - - Used to branch by comparing a value to a pattern. - (Originally from FSComp.txt:1440) - - - - - Used in computation expressions to bind a name to the result of another computation expression. - (Originally from FSComp.txt:1439) - - - - - Used to associate, or bind, a name to a value or function. - (Originally from FSComp.txt:1438) - - - - - Assigns a value to a variable. - (Originally from FSComp.txt:1479) - - - - - Used to specify a computation that is to be performed only when a result is needed. - (Originally from FSComp.txt:1437) - - - - - Used to specify that a member is visible inside an assembly but not outside it. - (Originally from FSComp.txt:1436) - - - - - Used to declare and implement interfaces. - (Originally from FSComp.txt:1435) - - - - - Used to indicate a function that should be integrated directly into the caller's code. - (Originally from FSComp.txt:1434) - - - - - Used to specify a base class or base interface. - (Originally from FSComp.txt:1433) - - - - - Used for sequence expressions and, in verbose syntax, to separate expressions from bindings. - (Originally from FSComp.txt:1432) - - - - - Used in conditional branching constructs. - (Originally from FSComp.txt:1431) - - - - - Used to reference the top-level .NET namespace. - (Originally from FSComp.txt:1430) - - - - - Used as a shorter alternative to the fun keyword and a match expression in a lambda expression that has pattern matching on a single argument. - (Originally from FSComp.txt:1429) - - - - - Used in lambda expressions, also known as anonymous functions. - (Originally from FSComp.txt:1428) - - - - - Used in looping constructs. - (Originally from FSComp.txt:1427) - - - - - Used together with try to introduce a block of code that executes regardless of whether an exception occurs. - (Originally from FSComp.txt:1426) - - - - - Indicates that a declared program element is defined in another binary or assembly. - (Originally from FSComp.txt:1424) - - - - - Used to declare an exception type. - (Originally from FSComp.txt:1423) - - - - - In type definitions and type extensions, indicates the end of a section of member definitions. In verbose syntax, used to specify the end of a code block that starts with the begin keyword. - (Originally from FSComp.txt:1422) - - - - - Used in conditional branching. - (Originally from FSComp.txt:1421) - - - - - Used in conditional branching. A short form of else if. - (Originally from FSComp.txt:1420) - - - - - Converts a type to a type that is lower in the hierarchy. - (Originally from FSComp.txt:1481) - - - - - In a for expression, used when counting in reverse. - (Originally from FSComp.txt:1419) - - - - - Used to convert to a type that is lower in the inheritance chain. - (Originally from FSComp.txt:1418) - - - - - In verbose syntax, indicates the end of a block of code in a looping expression. - (Originally from FSComp.txt:1417) - - - - - Used in looping constructs or to execute imperative code. - (Originally from FSComp.txt:1416) - - - - - Used to declare a delegate. - (Originally from FSComp.txt:1415) - - - - - Indicates an implementation of an abstract method; used together with an abstract method declaration to create a virtual method. - (Originally from FSComp.txt:1414) - - - - - Keyword to specify a constant literal as a type parameter argument in Type Providers. - (Originally from FSComp.txt:1413) - - - - - In verbose syntax, indicates the start of a class definition. - (Originally from FSComp.txt:1412) - - - - - Converts a type to type that is higher in the hierarchy. - (Originally from FSComp.txt:1480) - - - - - In verbose syntax, indicates the start of a code block. - (Originally from FSComp.txt:1411) - - - - - Used as the name of the base class object. - (Originally from FSComp.txt:1410) - - - - - Used to verify code during debugging. - (Originally from FSComp.txt:1409) - - - - - Used to give the current class object an object name. Also used to give a name to a whole pattern within a pattern match. - (Originally from FSComp.txt:1408) - - - - - Used in mutually recursive bindings, in property declarations, and with multiple constraints on generic parameters. - (Originally from FSComp.txt:1407) - - - - - Indicates a method that either has no implementation in the type in which it is declared or that is virtual and has a default implementation. - (Originally from FSComp.txt:1406) - - - - - %s '%s' not found in type '%s' from assembly '%s'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. - (Originally from FSComp.txt:1485) - - - - - %s '%s' not found in assembly '%s'. A possible cause may be a version incompatibility. You may need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version. - (Originally from FSComp.txt:1484) - - - - - XML comment is not placed on a valid language element. - (Originally from FSComp.txt:1675) - - - - - The 'anycpu32bitpreferred' platform can only be used with EXE targets. You must use 'anycpu' instead. - (Originally from FSComp.txt:1321) - - - - - invalid namespace for provided type - (Originally from FSComp.txt:1217) - - - - - invalid full name for provided type - (Originally from FSComp.txt:1218) - - - - - Invalid provided literal value '%s' - (Originally from FSComp.txt:1320) - - - - - This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield!'. - (Originally from FSComp.txt:1497) - - - - - This expression returns a value of type '%s' but is implicitly discarded. Consider using 'let' to bind the result to a name, e.g. 'let result = expression'. If you intended to use the expression as a value in the sequence then use an explicit 'yield'. - (Originally from FSComp.txt:1496) - - - - - The 'InlineIfLambda' attribute is present in the signature but not the implementation. - (Originally from FSComp.txt:1673) - - - - - The type '%s' is required here and is unavailable. You must add a reference to assembly '%s'. - (Originally from FSComp.txt:988) - - - - - A reference to the type '%s' in assembly '%s' was found, but the type could not be found in that assembly - (Originally from FSComp.txt:989) - - - - - A reference to the DLL %s is required by assembly %s. The imported type %s is located in the first assembly and could not be resolved. - (Originally from FSComp.txt:991) - - - - - Internal error or badly formed metadata: not enough type parameters were in scope while importing - (Originally from FSComp.txt:990) - - - - - Invalid number of generic arguments to type '%s' in provided type. Expected '%d' arguments, given '%d'. - (Originally from FSComp.txt:1297) - - - - - Invalid value unit-of-measure parameter '%s' - (Originally from FSComp.txt:1299) - - - - - Invalid value '%s' for unit-of-measure parameter '%s' - (Originally from FSComp.txt:1298) - - - - - An imported assembly uses the type '%s' but that type is not public - (Originally from FSComp.txt:992) - - - - - Invalid argument to 'methodhandleof' during codegen - (Originally from FSComp.txt:1259) - - - - - The resumable code construct '%s' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. - (Originally from FSComp.txt:1650) - - - - - Unknown debug point '%s'. The available debug points are '%s'. - (Originally from FSComp.txt:1661) - - - - - Unexpected error creating debug information file '%s' - (Originally from FSComp.txt:1015) - - - - - The file '%s' changed on disk unexpectedly, please reload. - (Originally from FSComp.txt:1498) - - - - - Compiler error: unexpected unrealized value - (Originally from FSComp.txt:834) - - - - - Unexpected GetSet annotation on a property - (Originally from FSComp.txt:837) - - - - - Undefined value '%s' - (Originally from FSComp.txt:821) - - - - - This type cannot be used for a literal field - (Originally from FSComp.txt:836) - - - - - The StructLayout attribute could not be decoded - (Originally from FSComp.txt:839) - - - - - GenSetStorage: %s was represented as a static method but was not an appropriate lambda expression - (Originally from FSComp.txt:832) - - - - - The signature for this external function contains type parameters. Constrain the argument and return types to indicate the types of the corresponding C function. - (Originally from FSComp.txt:829) - - - - - RSA key expected - (Originally from FSComp.txt:1141) - - - - - Private key expected - (Originally from FSComp.txt:1140) - - - - - No signature directory - (Originally from FSComp.txt:1146) - - - - - Invalid signature size - (Originally from FSComp.txt:1145) - - - - - Invalid RSAParameters structure - '{0}' expected - (Originally from FSComp.txt:1143) - - - - - Invalid Public Key blob - (Originally from FSComp.txt:1147) - - - - - Invalid Magic value in CLR Header - (Originally from FSComp.txt:1138) - - - - - Invalid bit Length - (Originally from FSComp.txt:1142) - - - - - Invalid algId - 'Exponent' expected - (Originally from FSComp.txt:1144) - - - - - Bad image format - (Originally from FSComp.txt:1139) - - - - - Reflected definitions cannot contain uses of the prefix splice operator '%%' - (Originally from FSComp.txt:841) - - - - - Mutable variables cannot escape their method - (Originally from FSComp.txt:833) - - - - - The MarshalAs attribute could not be decoded - (Originally from FSComp.txt:828) - - - - - Main module of program is empty: nothing will happen when it is run - (Originally from FSComp.txt:835) - - - - - Literal fields cannot be set - (Originally from FSComp.txt:831) - - - - - Label %s not found - (Originally from FSComp.txt:822) - - - - - Incorrect number of type arguments to local call - (Originally from FSComp.txt:823) - - - - - The FieldOffset attribute could not be decoded - (Originally from FSComp.txt:838) - - - - - The FieldOffset attribute can only be placed on members of types marked with the StructLayout(LayoutKind.Explicit) - (Originally from FSComp.txt:1106) - - - - - The type '%s' has been marked as having an Explicit layout, but the field '%s' has not been marked with the 'FieldOffset' attribute - (Originally from FSComp.txt:1097) - - - - - Dynamic invocation of %s is not supported - (Originally from FSComp.txt:824) - - - - - The DllImport attribute could not be decoded - (Originally from FSComp.txt:830) - - - - - The DefaultAugmentation attribute could not be decoded - (Originally from FSComp.txt:840) - - - - - Custom marshallers cannot be specified in F# code. Consider using a C# helper function. - (Originally from FSComp.txt:827) - - - - - This operation involves taking the address of a value '%s' represented using a local variable or other special representation. This is invalid. - (Originally from FSComp.txt:826) - - - - - Taking the address of a literal field is invalid - (Originally from FSComp.txt:825) - - - - - The 'if' expression needs to return a tuple of length %d of type\n %s \nto satisfy context type requirements. It currently returns a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:28) - - - - - The 'if' expression needs to have type '%s' to satisfy context type requirements. It currently has type '%s'. - (Originally from FSComp.txt:27) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - Invalid directive '#%s %s' - (Originally from FSComp.txt:1536) - - - - - Cannot find FSharp.Core.dll in compiler's directory - (Originally from FSComp.txt:1374) - - - - - Conflicting options specified: 'win32manifest' and 'win32res'. Only one of these can be used. - (Originally from FSComp.txt:1153) - - - - - Exiting - too many errors - (Originally from FSComp.txt:1149) - - - - - System.Runtime.InteropServices assembly is required to use UnknownWrapper\DispatchWrapper classes. - (Originally from FSComp.txt:1356) - - - - - Static linking may not be used on an assembly referencing mscorlib (e.g. a .NET Framework assembly) when generating an assembly that references System.Runtime (e.g. a .NET Core or Portable assembly). - (Originally from FSComp.txt:1172) - - - - - Static linking may not include a mixed managed/unmanaged DLL - (Originally from FSComp.txt:1157) - - - - - Static linking may not include a .EXE - (Originally from FSComp.txt:1156) - - - - - Passing a .resx file (%s) as a source file to the compiler is deprecated. Use resgen.exe to transform the .resx file into a .resources file to pass as a --resource option. If you are using MSBuild, this can be done via an <EmbeddedResource> item in the .fsproj project file. - (Originally from FSComp.txt:1171) - - - - - The resident compilation service was not used because a problem occured in communicating with the server. - (Originally from FSComp.txt:1169) - - - - - The assembly '%s' is listed on the command line. Assemblies should be referenced using a command line flag such as '-r'. - (Originally from FSComp.txt:1168) - - - - - Code in this assembly makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. - (Originally from FSComp.txt:1155) - - - - - The code in assembly '%s' makes uses of quotation literals. Static linking may not include components that make use of quotation literals unless all assemblies are compiled with at least F# 4.0. - (Originally from FSComp.txt:1154) - - - - - A problem occurred writing the binary '%s': %s - (Originally from FSComp.txt:1162) - - - - - No implementation files specified - (Originally from FSComp.txt:1151) - - - - - Option '--keycontainer' overrides attribute 'System.Reflection.AssemblyNameAttribute' given in a source file or added module - (Originally from FSComp.txt:1167) - - - - - Option '--keyfile' overrides attribute 'System.Reflection.AssemblyKeyFileAttribute' given in a source file or added module - (Originally from FSComp.txt:1166) - - - - - The key file '%s' could not be opened - (Originally from FSComp.txt:1161) - - - - - Ignoring mixed managed/unmanaged assembly '%s' during static linking - (Originally from FSComp.txt:1158) - - - - - Option '--delaysign' overrides attribute 'System.Reflection.AssemblyDelaySignAttribute' given in a source file or added module - (Originally from FSComp.txt:1165) - - - - - The attribute %s specified version '%s', but this value is invalid and has been ignored - (Originally from FSComp.txt:1152) - - - - - Assembly '%s' was referenced transitively and the assembly could not be resolved automatically. Static linking will assume this DLL has no dependencies on the F# library or other statically linked DLLs. Consider adding an explicit reference to this DLL. - (Originally from FSComp.txt:1159) - - - - - An %s specified version '%s', but this value is a wildcard, and you have requested a deterministic build, these are in conflict. - (Originally from FSComp.txt:1173) - - - - - The 'AssemblyVersionAttribute' has been ignored because a version was given using a command line option - (Originally from FSComp.txt:1163) - - - - - Assembly '%s' not found in dependency set of target binary. Statically linked roots should be specified using an assembly name, without a DLL or EXE extension. If this assembly was referenced explicitly then it is possible the assembly was not actually required by the generated binary, in which case it should not be statically linked. - (Originally from FSComp.txt:1160) - - - - - Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be satellite assemblies, Culture should always be empty' - (Originally from FSComp.txt:1164) - - - - - The 'from the end slicing' feature requires language version 'preview'. - (Originally from FSComp.txt:1527) - - - - - - %s - (Originally from FSComp.txt:1544) - - - - - Prefix flag (' ' or '+') set twice - (Originally from FSComp.txt:233) - - - - - Precision missing after the '.' - (Originally from FSComp.txt:238) - - - - - Positional specifiers are not permitted in format strings - (Originally from FSComp.txt:230) - - - - - The '%%A' format specifier may not be used in an assembly being compiled with option '--reflectionfree'. This construct implicitly uses reflection. - (Originally from FSComp.txt:245) - - - - - Missing format specifier - (Originally from FSComp.txt:231) - - - - - The 'l' or 'L' in this format specifier is unnecessary. In F# code you can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - (Originally from FSComp.txt:241) - - - - - The # formatting modifier is invalid in F# - (Originally from FSComp.txt:234) - - - - - 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. - (Originally from FSComp.txt:242) - - - - - Interpolated strings used as type IFormattable or type FormattableString may not use '%%' specifiers, only .NET-style interpolands such as '{expr}', '{expr,3}' or '{expr:N5}' may be used. - (Originally from FSComp.txt:1617) - - - - - The '%%P' specifier may not be used explicitly. - (Originally from FSComp.txt:1616) - - - - - .NET-style format specifiers such as '{x,3}' or '{x:N5}' may not be mixed with '%%' format specifiers. - (Originally from FSComp.txt:1615) - - - - - Interpolated strings may not use '%%' format specifiers unless each is given an expression, e.g. '%%d{1+1}'. - (Originally from FSComp.txt:1614) - - - - - '%s' format does not support precision - (Originally from FSComp.txt:239) - - - - - '%s' flag set twice - (Originally from FSComp.txt:232) - - - - - '%s' format does not support '0' flag - (Originally from FSComp.txt:237) - - - - - '%s' does not support prefix '%s' flag - (Originally from FSComp.txt:243) - - - - - Bad width in format specifier - (Originally from FSComp.txt:236) - - - - - Bad precision in format specifier - (Originally from FSComp.txt:235) - - - - - Bad format specifier: '%s' - (Originally from FSComp.txt:244) - - - - - Bad format specifier (after l or L): Expected ld,li,lo,lu,lx or lX. In F# code you can use %%d, %%x, %%o or %%u instead, which are overloaded to work with all basic integer types. - (Originally from FSComp.txt:240) - - - - - All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length %d of type\n %s \nThis branch returns a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:32) - - - - - All branches of a pattern match expression must return values implicitly convertible to the type of the first branch, which here is '%s'. This branch returns a value of type '%s'. - (Originally from FSComp.txt:31) - - - - - The record, struct or class field '%s' is not accessible from this code location - (Originally from FSComp.txt:976) - - - - - witness passing for trait constraints in F# quotations - (Originally from FSComp.txt:1560) - - - - - wild card in for loop - (Originally from FSComp.txt:1546) - - - - - 'while!' expression - (Originally from FSComp.txt:1588) - - - - - Raises warnings when multiple record type matches were found during name resolution because of overlapping field names. - (Originally from FSComp.txt:1583) - - - - - Raises warnings when 'let inline ... =' is used together with [<MethodImpl(MethodImplOptions.NoInlining)>] attribute. Function is not getting inlined. - (Originally from FSComp.txt:1574) - - - - - Raises warnings when an copy-and-update record expression changes all fields of a record. - (Originally from FSComp.txt:1578) - - - - - Interop between C#'s and F#'s unmanaged generic constraint (emit additional modreq) - (Originally from FSComp.txt:1723) - - - - - Support for try-with in sequence expressions - (Originally from FSComp.txt:1577) - - - - - struct representation for active patterns - (Originally from FSComp.txt:1562) - - - - - string interpolation - (Originally from FSComp.txt:1559) - - - - - Raises errors on incorrect indentation, allows better recovery and analysis during editing - (Originally from FSComp.txt:1585) - - - - - Static members in interfaces - (Originally from FSComp.txt:1579) - - - - - Allow static let bindings in union, record, struct, non-incremental-class types - (Originally from FSComp.txt:1711) - - - - - single underscore pattern - (Originally from FSComp.txt:1545) - - - - - self type constraints - (Originally from FSComp.txt:1567) - - - - - resumable state machines - (Originally from FSComp.txt:1556) - - - - - support for required properties - (Originally from FSComp.txt:1568) - - - - - whitespace relaxation v2 - (Originally from FSComp.txt:1563) - - - - - whitespace relexation - (Originally from FSComp.txt:1547) - - - - - informational messages related to reference cells - (Originally from FSComp.txt:1251) - - - - - list literals of any size - (Originally from FSComp.txt:1564) - - - - - binary formatting for integers - (Originally from FSComp.txt:1249) - - - - - prefer String.GetPinnableReference in fixed bindings - (Originally from FSComp.txt:1590) - - - - - package management - (Originally from FSComp.txt:1552) - - - - - overloads for custom operations - (Originally from FSComp.txt:1247) - - - - - open type declaration - (Originally from FSComp.txt:1550) - - - - - nullable optional interop - (Originally from FSComp.txt:1557) - - - - - non-variable patterns to the right of 'as' patterns - (Originally from FSComp.txt:1253) - - - - - String values marked as literals and IL constants as printf format - (Originally from FSComp.txt:1580) - - - - - Nested record field copy-and-update - (Originally from FSComp.txt:1581) - - - - - nameof - (Originally from FSComp.txt:1548) - - - - - Pattern match discard is not allowed for union case that takes no data. - (Originally from FSComp.txt:1571) - - - - - ML compatibility revisions - (Originally from FSComp.txt:1255) - - - - - Allow lowercase DU when RequireQualifiedAccess attribute - (Originally from FSComp.txt:1570) - - - - - interfaces with multiple generic instantiation - (Originally from FSComp.txt:1597) - - - - - static abstract interface members - (Originally from FSComp.txt:1566) - - - - - support for consuming init properties - (Originally from FSComp.txt:1569) - - - - - Diagnostic 3559 (warn when obj inferred) at informational level, off by default - (Originally from FSComp.txt:1710) - - - - - expr[idx] notation for indexing and slicing - (Originally from FSComp.txt:1250) - - - - - Improved implied argument names - (Originally from FSComp.txt:1584) - - - - - implicit yield - (Originally from FSComp.txt:1549) - - - - - from-end slicing - (Originally from FSComp.txt:1553) - - - - - fixed-index slice 3d/4d - (Originally from FSComp.txt:1554) - - - - - Extended string interpolation similar to C# raw string literals. - (Originally from FSComp.txt:1582) - - - - - extended fixed bindings for byref and GetPinnableReference - (Originally from FSComp.txt:1589) - - - - - more types support units of measure - (Originally from FSComp.txt:1248) - - - - - Escapes curly braces before calling FormattableStringFactory.Create when interpolated string literal is typed as FormattableString - (Originally from FSComp.txt:1694) - - - - - Error reporting on static classes - (Originally from FSComp.txt:1576) - - - - - give error on deprecated access of construct with RequireQualifiedAccess attribute - (Originally from FSComp.txt:1565) - - - - - Raises errors for non-virtual members overrides - (Originally from FSComp.txt:1573) - - - - - dotless float32 literal - (Originally from FSComp.txt:1551) - - - - - discard pattern in use binding - (Originally from FSComp.txt:1252) - - - - - fix to resolution of delegate type names, see https://github.com/dotnet/fsharp/issues/10228 - (Originally from FSComp.txt:1257) - - - - - default interface member consumption - (Originally from FSComp.txt:1558) - - - - - Constraint intersection on flexible types - (Originally from FSComp.txt:1586) - - - - - Raises warnings if a member or function has the 'TailCall' attribute, but is not being used in a tail recursive way. - (Originally from FSComp.txt:1587) - - - - - Allow implicit Extension attribute on declaring types, modules - (Originally from FSComp.txt:1572) - - - - - automatic generation of 'Message' property for 'exception' declarations - (Originally from FSComp.txt:1256) - - - - - attributes to the right of the 'module' keyword - (Originally from FSComp.txt:1254) - - - - - Arithmetic and logical operations in literals, enum definitions and attributes - (Originally from FSComp.txt:1575) - - - - - applicative computation expressions - (Originally from FSComp.txt:1555) - - - - - additional type-directed conversions - (Originally from FSComp.txt:1561) - - - - - underscore dot shorthand for accessor only function - (Originally from FSComp.txt:1718) - - - - - Expression does not have a name. - (Originally from FSComp.txt:1521) - - - - - This construct is experimental - (Originally from FSComp.txt:978) - - - - - The event '%s' has a non-standard type. If this event is declared in another CLI language, you may need to access this event using the explicit %s and %s methods for the event. If this event is declared in F#, make the type of the event an instantiation of either 'IDelegateEvent<_>' or 'IEvent<_,_>'. - (Originally from FSComp.txt:971) - - - - - Unsupported expression '%s' from type provider. If you are the author of this type provider, consider adjusting it to provide a different provided expression. - (Originally from FSComp.txt:1196) - - - - - Invalid member '%s' on provided type '%s'. Only properties, methods and constructors are allowed - (Originally from FSComp.txt:1188) - - - - - Unsupported constant type '%s'. Quotations provided by type providers can only contain simple constants. The implementation of the type provider may need to be adjusted by moving a value declared outside a provided quotation literal to be a 'let' binding inside the quotation literal. - (Originally from FSComp.txt:1195) - - - - - Unknown static argument kind '%s' when resolving a reference to a provided type or method '%s' - (Originally from FSComp.txt:1214) - - - - - Unexpected 'null' return value from provided type '%s' member '%s' - (Originally from FSComp.txt:1209) - - - - - Unexpected exception from provided type '%s' member '%s': %s - (Originally from FSComp.txt:1194) - - - - - Unexpected exception from member '%s' of provided type '%s' member '%s': %s - (Originally from FSComp.txt:1210) - - - - - The type provider constructor has thrown an exception: %s - (Originally from FSComp.txt:1220) - - - - - Too many static parameters. Expected at most %d parameters, but got %d unnamed and %d named parameters. - (Originally from FSComp.txt:1319) - - - - - The static parameter '%s' of the provided type or method '%s' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. '%s<%s=...>'. - (Originally from FSComp.txt:1240) - - - - - The static parameter '%s' has already been given a value - (Originally from FSComp.txt:1242) - - - - - The type provider returned 'null', which is not a valid return value from '%s' - (Originally from FSComp.txt:1219) - - - - - Assembly attribute '%s' refers to a designer assembly '%s' which cannot be loaded or doesn't exist. The exception reported was: %s - %s - (Originally from FSComp.txt:1200) - - - - - Assembly attribute '%s' refers to a designer assembly '%s' which cannot be loaded from path '%s'. The exception reported was: %s - %s - (Originally from FSComp.txt:1201) - - - - - The type provider designer assembly '%s' could not be loaded from folder '%s'. The exception reported was: %s - %s - (Originally from FSComp.txt:1216) - - - - - The type provider designer assembly '%s' could not be loaded from folder '%s' because a dependency was missing or could not loaded. All dependencies of the type provider designer assembly must be located in the same folder as that assembly. The exception reported was: %s - %s - (Originally from FSComp.txt:1215) - - - - - The type provider '%s' reported an error in the context of provided type '%s', member '%s'. The error: %s - (Originally from FSComp.txt:1233) - - - - - The type provider '%s' reported an error: %s - (Originally from FSComp.txt:1203) - - - - - The type provider does not have a valid constructor. A constructor taking either no arguments or one argument of type 'TypeProviderConfig' was expected. - (Originally from FSComp.txt:1202) - - - - - The '%s' of a provided type was null or empty. - (Originally from FSComp.txt:1235) - - - - - An exception occurred when accessing the '%s' of a provided type: %s - (Originally from FSComp.txt:1234) - - - - - A reference to a provided type was missing a value for the static parameter '%s'. You may need to recompile one or more referenced assemblies. - (Originally from FSComp.txt:1260) - - - - - A reference to a provided type had an invalid value '%s' for a static parameter. You may need to recompile one or more referenced assemblies. - (Originally from FSComp.txt:1261) - - - - - Expected provided type with path '%s' but provided type has path '%s' - (Originally from FSComp.txt:1208) - - - - - Expected provided type named '%s' but provided type has 'Name' with value '%s' - (Originally from FSComp.txt:1197) - - - - - The type provider '%s' returned an invalid type from 'ApplyStaticArguments'. A type with name '%s' was expected, but a type with name '%s' was returned. - (Originally from FSComp.txt:1222) - - - - - The type provider '%s' returned an invalid method from 'ApplyStaticArgumentsForMethod'. A method with name '%s' was expected, but a method with name '%s' was returned. - (Originally from FSComp.txt:1223) - - - - - Property '%s' on provided type '%s' is neither readable nor writable as it has CanRead=false and CanWrite=false - (Originally from FSComp.txt:1300) - - - - - Property '%s' on provided type '%s' has CanWrite=false but GetSetMethod() returned a method - (Originally from FSComp.txt:1192) - - - - - Property '%s' on provided type '%s' has CanRead=false but GetGetMethod() returned a method - (Originally from FSComp.txt:1190) - - - - - Property '%s' on provided type '%s' has CanWrite=true but there was no value from GetSetMethod() - (Originally from FSComp.txt:1191) - - - - - Property '%s' on provided type '%s' has CanRead=true but there was no value from GetGetMethod() - (Originally from FSComp.txt:1189) - - - - - One or more errors seen during provided type setup - (Originally from FSComp.txt:1193) - - - - - Type provider '%s' returned null from GetInvokerExpression. - (Originally from FSComp.txt:1221) - - - - - The provided type '%s' returned a member with a null or empty member name - (Originally from FSComp.txt:1178) - - - - - The provided type '%s' has member '%s' which has declaring type '%s'. Expected declaring type to be the same as provided type. - (Originally from FSComp.txt:1181) - - - - - The provided type '%s' member info '%s' has null declaring type - (Originally from FSComp.txt:1180) - - - - - The provided type '%s' returned a null member - (Originally from FSComp.txt:1179) - - - - - No static parameter exists with name '%s' - (Originally from FSComp.txt:1241) - - - - - Nested provided types do not take static arguments or generic parameters - (Originally from FSComp.txt:1211) - - - - - Provided type '%s' has 'IsGenericType' as true, but generic types are not supported. - (Originally from FSComp.txt:1185) - - - - - Provided type '%s' has 'IsArray' as true, but array types are not supported. - (Originally from FSComp.txt:1186) - - - - - Multiple static parameters exist with name '%s' - (Originally from FSComp.txt:1243) - - - - - This provided method requires static parameters - (Originally from FSComp.txt:1376) - - - - - Invalid member '%s' on provided type '%s'. Provided type members must be public, and not be generic, virtual, or abstract. - (Originally from FSComp.txt:1187) - - - - - Assembly '%s' hase TypeProviderAssembly attribute with invalid value '%s'. The value should be a valid assembly name - (Originally from FSComp.txt:1228) - - - - - Invalid static argument to provided type. Expected an argument of kind '%s'. - (Originally from FSComp.txt:1212) - - - - - The type provider '%s' provided a method with a name '%s' and metadata token '%d', which is not reported among its methods of its declaring type '%s' - (Originally from FSComp.txt:1205) - - - - - The type provider '%s' provided a constructor which is not reported among the constructors of its declaring type '%s' - (Originally from FSComp.txt:1206) - - - - - The type provider '%s' used an invalid parameter in the ParameterExpression: %s - (Originally from FSComp.txt:1204) - - - - - Character '%s' is not allowed in provided type name '%s' - (Originally from FSComp.txt:1236) - - - - - Character '%s' is not allowed in provided namespace name '%s' - (Originally from FSComp.txt:1177) - - - - - Referenced assembly '%s' has assembly level attribute '%s' but no public type provider classes were found - (Originally from FSComp.txt:1182) - - - - - Event '%s' on provided type '%s' has no value from GetRemoveMethod() - (Originally from FSComp.txt:1199) - - - - - Event '%s' on provided type '%s' has no value from GetAddMethod() - (Originally from FSComp.txt:1198) - - - - - An error occured applying the static arguments to a provided type - (Originally from FSComp.txt:1213) - - - - - An error occured applying the static arguments to a provided method - (Originally from FSComp.txt:1359) - - - - - The provider '%s' returned a non-generated type '%s' in the context of a set of generated types. Consider adjusting the type provider to only return generated types. - (Originally from FSComp.txt:1323) - - - - - Type '%s' from type provider '%s' has an empty namespace. Use 'null' for the global namespace. - (Originally from FSComp.txt:1183) - - - - - Empty namespace found from the type provider '%s'. Use 'null' for the global namespace. - (Originally from FSComp.txt:1184) - - - - - A direct reference to the generated type '%s' is not permitted. Instead, use a type definition, e.g. 'type TypeAlias = <path>'. This indicates that a type provider adds generated types to your assembly. - (Originally from FSComp.txt:1207) - - - - - Named static arguments must come after all unnamed static arguments - (Originally from FSComp.txt:1239) - - - - - A type provider implemented GetStaticParametersForMethod, but ApplyStaticArgumentsForMethod was not implemented or invalid - (Originally from FSComp.txt:1358) - - - - - Erased to - (Originally from FSComp.txt:1328) - - - - - All branches of an 'if' expression must return values implicitly convertible to the type of the first branch, which here is a tuple of length %d of type\n %s \nThis branch returns a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:30) - - - - - All branches of an 'if' expression must return values implicitly convertible to the type of the first branch, which here is '%s'. This branch returns a value of type '%s'. - (Originally from FSComp.txt:29) - - - - - System.Environment.Exit did not exit - (Originally from FSComp.txt:246) - - - - - The treatment of this operator is now handled directly by the F# compiler and its meaning cannot be redefined - (Originally from FSComp.txt:247) - - - - - The documentation file has no .xml suffix - (Originally from FSComp.txt:1150) - - - - - is - (Originally from FSComp.txt:1486) - - - - - (description unavailable...) - (Originally from FSComp.txt:1335) - - - - - The '!' operator is used to dereference a ref cell. Consider using 'not expr' here. - (Originally from FSComp.txt:35) - - - - - Delegates are not allowed to have curried signatures - (Originally from FSComp.txt:981) - - - - - %s var in collection - (Originally from FSComp.txt:1266) - - - - - %s var in collection %s (outerKey = innerKey). Note that parentheses are required after '%s' - (Originally from FSComp.txt:1264) - - - - - %s var in collection %s (outerKey = innerKey) into group. Note that parentheses are required after '%s' - (Originally from FSComp.txt:1265) - - - - - The constraints 'unmanaged' and 'not struct' are inconsistent - (Originally from FSComp.txt:324) - - - - - None of the types '%s' support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from FSComp.txt:318) - - - - - None of the types '%s' support the operator '%s' - (Originally from FSComp.txt:316) - - - - - This type parameter cannot be instantiated to 'Nullable'. This is a restriction imposed in order to ensure the meaning of 'null' in some CLI languages is not confusing when used in conjunction with 'Nullable' values. - (Originally from FSComp.txt:336) - - - - - The type '%s' is not compatible with any of the types %s, arising from the use of a printf-style format string - (Originally from FSComp.txt:339) - - - - - The type '%s' is not a CLI enum type - (Originally from FSComp.txt:333) - - - - - The type '%s' is not a CLI delegate type - (Originally from FSComp.txt:335) - - - - - Type instantiation length mismatch - (Originally from FSComp.txt:344) - - - - - Type inference problem too complicated (maximum iteration depth reached). Consider adding further type annotations. - (Originally from FSComp.txt:311) - - - - - The type '%s' has a non-standard delegate type - (Originally from FSComp.txt:334) - - - - - The type '%s' does not support the operator '%s'. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from FSComp.txt:319) - - - - - The type '%s' does not support the operator '%s' - (Originally from FSComp.txt:317) - - - - - The type '%s' does not support the 'equality' constraint because it is a record, union or struct with one or more structural element types which do not support the 'equality' constraint. Either avoid the use of equality with this type, or add the 'StructuralEquality' attribute to the type to determine which field type does not support equality - (Originally from FSComp.txt:332) - - - - - The type '%s' does not support the 'equality' constraint because it is a function type - (Originally from FSComp.txt:331) - - - - - The type '%s' does not support the 'equality' constraint because it has the 'NoEquality' attribute - (Originally from FSComp.txt:330) - - - - - The type '%s' does not support a conversion to the type '%s' - (Originally from FSComp.txt:320) - - - - - The type '%s' does not support the 'comparison' constraint because it is a record, union or struct with one or more structural element types which do not support the 'comparison' constraint. Either avoid the use of comparison with this type, or add the 'StructuralComparison' attribute to the type to determine which field type does not support comparison - (Originally from FSComp.txt:329) - - - - - The type '%s' does not support the 'comparison' constraint. For example, it does not support the 'System.IComparable' interface - (Originally from FSComp.txt:328) - - - - - The type '%s' does not support the 'comparison' constraint because it has the 'NoComparison' attribute - (Originally from FSComp.txt:327) - - - - - The type '%s' does not have 'null' as a proper value - (Originally from FSComp.txt:325) - - - - - The declared type parameter '%s' cannot be used here since the type parameter cannot be resolved at compile time - (Originally from FSComp.txt:309) - - - - - The constraints 'struct' and 'not struct' are inconsistent - (Originally from FSComp.txt:323) - - - - - The required signature is %s - (Originally from FSComp.txt:357) - - - - - Argument '%s' doesn't match - (Originally from FSComp.txt:383) - - - - - Argument at index %d doesn't match - (Originally from FSComp.txt:384) - - - - - Optional arguments not permitted here - (Originally from FSComp.txt:345) - - - - - The type '%s' does not have 'null' as a proper value. To create a null value for a Nullable type use 'System.Nullable()'. - (Originally from FSComp.txt:326) - - - - - Known type parameter: %s - (Originally from FSComp.txt:377) - - - - - Known type parameters: %s - (Originally from FSComp.txt:378) - - - - - Known return type: %s - (Originally from FSComp.txt:379) - - - - - Known type of argument: %s - (Originally from FSComp.txt:375) - - - - - Known types of arguments: %s - (Originally from FSComp.txt:376) - - - - - No overloads match for method '%s'. - (Originally from FSComp.txt:374) - - - - - No %s member or object constructor named '%s' takes %d arguments. The named argument '%s' doesn't correspond to any argument or settable return property for any overload. - (Originally from FSComp.txt:372) - - - - - No %s member or object constructor named '%s' takes %d arguments. Note the call to this member also provides %d named arguments. - (Originally from FSComp.txt:371) - - - - - No %s member or object constructor named '%s' takes %d arguments - (Originally from FSComp.txt:370) - - - - - Method or object constructor '%s' not found - (Originally from FSComp.txt:373) - - - - - A unique overload for method '%s' could not be determined based on type information prior to this program point. A type annotation may be needed. - (Originally from FSComp.txt:380) - - - - - %s is not an instance method - (Originally from FSComp.txt:354) - - - - - %s is not a static method - (Originally from FSComp.txt:353) - - - - - The type '%s' has a method '%s' (full name '%s'), but the method is static - (Originally from FSComp.txt:321) - - - - - The type '%s' has a method '%s' (full name '%s'), but the method is not static - (Originally from FSComp.txt:322) - - - - - This method expects a CLI '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 - (Originally from FSComp.txt:350) - - - - - The member or object constructor '%s' takes %d type argument(s) but is here given %d. The required signature is '%s'. - (Originally from FSComp.txt:366) - - - - - 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'. - (Originally from FSComp.txt:362) - - - - - The member or object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - (Originally from FSComp.txt:363) - - - - - The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. Some names for missing arguments are %s. - (Originally from FSComp.txt:361) - - - - - The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. Some names for missing arguments are %s. - (Originally from FSComp.txt:360) - - - - - The member or object constructor '%s' requires %d additional argument(s). The required signature is '%s'. - (Originally from FSComp.txt:359) - - - - - The member or object constructor '%s' requires %d argument(s). The required signature is '%s'. - (Originally from FSComp.txt:358) - - - - - The member or object constructor '%s' does not take %d argument(s). An overload was found taking %d arguments. - (Originally from FSComp.txt:369) - - - - - A member or object constructor '%s' taking %d arguments is not accessible from this code location. All accessible versions of method '%s' take %d arguments. - (Originally from FSComp.txt:367) - - - - - %s is not a static member - (Originally from FSComp.txt:346) - - - - - %s is not an instance member - (Originally from FSComp.txt:347) - - - - - The member or object constructor '%s' is not %s. Private members may only be accessed from within the declaring type. Protected members may only be accessed from an extending type and cannot be accessed from inner lambda expressions. - (Originally from FSComp.txt:352) - - - - - The member or object constructor '%s' is not %s - (Originally from FSComp.txt:351) - - - - - The member or object constructor '%s' has no argument or settable return property '%s'. %s. - (Originally from FSComp.txt:355) - - - - - This indexer expects %d arguments but is here given %d - (Originally from FSComp.txt:313) - - - - - Incorrect generic instantiation. No %s member named '%s' takes %d generic arguments. - (Originally from FSComp.txt:368) - - - - - A generic construct requires that the type '%s' is an unmanaged type - (Originally from FSComp.txt:338) - - - - - A generic construct requires that the type '%s' is a CLI or F# struct type - (Originally from FSComp.txt:337) - - - - - A generic construct requires that a generic type parameter be known as a struct or reference type. Consider adding a type annotation. - (Originally from FSComp.txt:343) - - - - - A generic construct requires that the type '%s' have reference semantics, but it does not, i.e. it is a struct - (Originally from FSComp.txt:340) - - - - - A generic construct requires that the type '%s' have a public default constructor - (Originally from FSComp.txt:342) - - - - - A generic construct requires that the type '%s' be non-abstract - (Originally from FSComp.txt:341) - - - - - Expected arguments to an instance member - (Originally from FSComp.txt:312) - - - - - Expecting a type supporting the operator '%s' but given a tuple type - (Originally from FSComp.txt:315) - - - - - Expecting a type supporting the operator '%s' but given a function type. You may be missing an argument to a function. - (Originally from FSComp.txt:314) - - - - - The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. If some of the arguments are meant to assign values to properties, consider separating those arguments with a comma (','). - (Originally from FSComp.txt:365) - - - - - The object constructor '%s' takes %d argument(s) but is here given %d. The required signature is '%s'. - (Originally from FSComp.txt:364) - - - - - The object constructor '%s' has no argument or settable return property '%s'. %s. - (Originally from FSComp.txt:356) - - - - - 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 '_'. - (Originally from FSComp.txt:310) - - - - - Candidates:\n%s - (Originally from FSComp.txt:381) - - - - - Available overloads:\n%s - (Originally from FSComp.txt:382) - - - - - The argument types don't match - (Originally from FSComp.txt:349) - - - - - Argument length mismatch - (Originally from FSComp.txt:348) - - - - - Quotations cannot contain expressions that set union case fields - (Originally from FSComp.txt:301) - - - - - Quotations cannot contain expressions that set fields in exception values - (Originally from FSComp.txt:302) - - - - - Quotations cannot contain expressions that require byref pointers - (Originally from FSComp.txt:303) - - - - - Quotations cannot contain expressions that fetch union case indexes - (Originally from FSComp.txt:300) - - - - - Quotations cannot contain this kind of type - (Originally from FSComp.txt:308) - - - - - Quotations cannot contain this kind of pattern match - (Originally from FSComp.txt:306) - - - - - Quotations cannot contain this kind of constant - (Originally from FSComp.txt:305) - - - - - Quotations cannot contain expressions that fetch static fields - (Originally from FSComp.txt:297) - - - - - Quotations cannot contain object expressions - (Originally from FSComp.txt:295) - - - - - Quotations cannot contain inline assembly code or pattern matching on arrays - (Originally from FSComp.txt:298) - - - - - Quotations cannot contain function definitions that are inferred or declared to be generic. Consider adding some type constraints to make this a valid quoted expression. - (Originally from FSComp.txt:294) - - - - - Quotations cannot contain uses of generic expressions - (Originally from FSComp.txt:293) - - - - - Quotations cannot contain descending for loops - (Originally from FSComp.txt:299) - - - - - Quotations cannot contain array pattern matching - (Originally from FSComp.txt:307) - - - - - Quotations cannot contain expressions that take the address of a field - (Originally from FSComp.txt:296) - - - - - Quotations cannot contain expressions that make member constraint calls, or uses of operators that implicitly resolve to a member constraint call - (Originally from FSComp.txt:304) - - - - - A quotation may not involve an assignment to or taking the address of a captured local variable - (Originally from FSComp.txt:1325) - - - - - Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function is no longer generic. - (Originally from FSComp.txt:1117) - - - - - 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. - (Originally from FSComp.txt:292) - - - - - The dependency manager extension %s could not be loaded. Message: %s - (Originally from FSComp.txt:1520) - - - - - Key container signing is not supported on this platform. - (Originally from FSComp.txt:1646) - - - - - The 'AssemblyKeyNameAttribute' has been deprecated. Use 'AssemblyKeyFileAttribute' instead. - (Originally from FSComp.txt:1645) - - - - - The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using the :> (upcast) operator instead of the :?> (downcast) operator. - (Originally from FSComp.txt:1378) - - - - - The conversion from %s to %s is a compile-time safe upcast, not a downcast. Consider using 'upcast' instead of 'downcast'. - (Originally from FSComp.txt:1377) - - - - - A ';' is used to separate field values in records. Consider replacing ',' with ';'. - (Originally from FSComp.txt:34) - - - - - The variable '%s' is used in an invalid way - (Originally from FSComp.txt:251) - - - - - 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 - (Originally from FSComp.txt:290) - - - - - The value '%s' is unused - (Originally from FSComp.txt:1068) - - - - - The recursive object reference '%s' is unused. The presence of a recursive object reference adds runtime initialization checks to members in this and derived types. Consider removing this recursive object reference. - (Originally from FSComp.txt:1069) - - - - - default augmentation of the union case - (Originally from FSComp.txt:276) - - - - - compiled form of the union case - (Originally from FSComp.txt:275) - - - - - The type '%s' is less accessible than the value, member or type '%s' it is used in. - (Originally from FSComp.txt:252) - - - - - A type variable has been constrained by multiple different class types. A type variable may only have one class constraint. - (Originally from FSComp.txt:1336) - - - - - 'System.Void' can only be used as 'typeof<System.Void>' in F# - (Originally from FSComp.txt:253) - - - - - Struct members cannot return the address of fields of the struct by reference - (Originally from FSComp.txt:1507) - - - - - Expression-splicing operators may only be used within quotations - (Originally from FSComp.txt:256) - - - - - A method return type would contain byrefs which is not permitted - (Originally from FSComp.txt:268) - - - - - [<ReflectedDefinition>] terms cannot contain uses of the prefix splice operator '%%' - (Originally from FSComp.txt:273) - - - - - 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. - (Originally from FSComp.txt:248) - - - - - The property '%s' has the same name as a method in type '%s'. - (Originally from FSComp.txt:277) - - - - - The property '%s' has the same name as another property in type '%s', but one takes indexer arguments and the other does not. You may be missing an indexer argument to one of your properties. - (Originally from FSComp.txt:279) - - - - - The member or function '%s' has the 'TailCallAttribute' attribute, but is not being used in a tail recursive way. - (Originally from FSComp.txt:1715) - - - - - This value can't be assigned because the target '%s' may refer to non-stack-local memory, while the expression being assigned is assessed to potentially refer to stack-local memory. This is to help prevent pointers to stack-bound memory escaping their scope. - (Originally from FSComp.txt:1504) - - - - - The Span or IsByRefLike variable '%s' cannot be used at this point. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1509) - - - - - A Span or IsByRefLike value returned from the expression cannot be used at ths point. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1510) - - - - - ReflectedDefinitionAttribute may not be applied to an instance member on a struct type, because the instance member takes an implicit 'this' byref parameter - (Originally from FSComp.txt:1111) - - - - - First-class uses of the expression-splicing operator are not permitted - (Originally from FSComp.txt:257) - - - - - First-class uses of the 'reraise' function is not permitted - (Originally from FSComp.txt:259) - - - - - Using the 'nameof' operator as a first-class function value is not permitted. - (Originally from FSComp.txt:1522) - - - - - First-class uses of the address-of operators are not permitted - (Originally from FSComp.txt:258) - - - - - Type '%s' is illegal because in byref<T>, T cannot contain byref types. - (Originally from FSComp.txt:1308) - - - - - The function or method call cannot be used at this point, because one argument that is a byref of a non-stack-local Span or IsByRefLike type is used with another argument that is a stack-local Span or IsByRefLike type. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1508) - - - - - The type abbreviation contains byrefs. This is not permitted by F#. - (Originally from FSComp.txt:291) - - - - - The byref typed value '%s' cannot be used at this point - (Originally from FSComp.txt:260) - - - - - A byref typed value would be stored here. Top-level let-bound byref values are not permitted. - (Originally from FSComp.txt:272) - - - - - The address of a value returned from the expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1503) - - - - - The address of the variable '%s' or a related expression cannot be used at this point. This is to ensure the address of the local value does not escape its scope. - (Originally from FSComp.txt:1388) - - - - - The address of the static field '%s' cannot be used at this point - (Originally from FSComp.txt:264) - - - - - The address of the variable '%s' cannot be used at this point - (Originally from FSComp.txt:263) - - - - - The address of an array element cannot be used at this point - (Originally from FSComp.txt:266) - - - - - The address of the field '%s' cannot be used at this point - (Originally from FSComp.txt:265) - - - - - This type implements the same interface at different generic instantiations '%s' and '%s'. This is not permitted in this version of F#. - (Originally from FSComp.txt:289) - - - - - 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. - (Originally from FSComp.txt:271) - - - - - 'base' values may only be used to make direct calls to the base implementations of overridden members - (Originally from FSComp.txt:261) - - - - - The function or method has an invalid return type '%s'. This is not permitted by the rules of Common IL. - (Originally from FSComp.txt:1525) - - - - - The parameter '%s' has an invalid type '%s'. This is not permitted by the rules of Common IL. - (Originally from FSComp.txt:1524) - - - - - Invalid custom attribute value (not a constant or literal) - (Originally from FSComp.txt:269) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Instance members are not allowed. - (Originally from FSComp.txt:1698) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Instance let bindings are not allowed. - (Originally from FSComp.txt:1699) - - - - - The use of 'incr' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'incr cell' to 'cell.Value <- cell.Value + 1'. - (Originally from FSComp.txt:1612) - - - - - The use of '!' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change '!cell' to 'cell.Value'. - (Originally from FSComp.txt:1610) - - - - - The use of 'decr' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'decr cell' to 'cell.Value <- cell.Value - 1'. - (Originally from FSComp.txt:1613) - - - - - The use of ':=' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'cell := expr' to 'cell.Value <- expr'. - (Originally from FSComp.txt:1611) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Implementing interfaces is not allowed. - (Originally from FSComp.txt:1700) - - - - - The property '%s' of type '%s' has a getter and a setter that do not match. If one is abstract then the other must be as well. - (Originally from FSComp.txt:278) - - - - - A property's getter and setter must have the same type. Property '%s' has getter of type '%s' but setter of type '%s'. - (Originally from FSComp.txt:1345) - - - - - The type of a first-class function cannot contain byrefs - (Originally from FSComp.txt:267) - - - - - Feature '%s' requires the F# library for language version %s or greater. - (Originally from FSComp.txt:1532) - - - - - Feature '%s' is not supported by target runtime. - (Originally from FSComp.txt:1534) - - - - - Feature '%s' is not available in F# %s. Please use language version %s or greater. - (Originally from FSComp.txt:1533) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Explicit field declarations are not allowed. - (Originally from FSComp.txt:1702) - - - - - A type instantiation involves a byref type. This is not permitted by the rules of Common IL. - (Originally from FSComp.txt:254) - - - - - Calls to 'reraise' may only occur directly in a handler of a try-with - (Originally from FSComp.txt:255) - - - - - A function labeled with the 'EntryPointAttribute' attribute must be the last declaration in the last file in the compilation sequence. - (Originally from FSComp.txt:274) - - - - - Duplicate parameter. The parameter '%s' has been used more that once in this method. - (Originally from FSComp.txt:1693) - - - - - Duplicate property. The property '%s' has the same name and signature as another property in type '%s' once tuples, functions, units of measure and/or provided types are erased. - (Originally from FSComp.txt:286) - - - - - Duplicate property. The property '%s' has the same name and signature as another property in type '%s'. - (Originally from FSComp.txt:285) - - - - - Duplicate method. The method '%s' has the same name and signature as another method in type '%s' once tuples, functions, units of measure and/or provided types are erased. - (Originally from FSComp.txt:282) - - - - - Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type once tuples, functions, units of measure and/or provided types are erased. - (Originally from FSComp.txt:288) - - - - - Duplicate method. The abstract method '%s' has the same name and signature as an abstract method in an inherited type. - (Originally from FSComp.txt:287) - - - - - The method '%s' has curried arguments but has the same name as another method in type '%s'. Methods with curried arguments cannot be overloaded. Consider using a method taking tupled arguments. - (Originally from FSComp.txt:283) - - - - - Duplicate method. The method '%s' has the same name and signature as another method in type '%s'. - (Originally from FSComp.txt:281) - - - - - Methods with curried arguments cannot declare 'out', 'ParamArray', 'optional', 'ReflectedDefinition', 'byref', 'CallerLineNumber', 'CallerMemberName', or 'CallerFilePath' arguments - (Originally from FSComp.txt:284) - - - - - This expression is an anonymous record, use {|...|} instead of {...}. - (Originally from FSComp.txt:1724) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Constructor with arguments is not allowed. - (Originally from FSComp.txt:1696) - - - - - A type would store a byref typed value. This is not permitted by Common IL. - (Originally from FSComp.txt:280) - - - - - The byref-typed variable '%s' is used in an invalid way. Byrefs cannot be captured by closures or passed to inner functions. - (Originally from FSComp.txt:249) - - - - - The 'base' keyword is used in an invalid way. Base calls cannot be used in closures. Consider using a private member to make base calls. - (Originally from FSComp.txt:250) - - - - - FSharp.Core.AutoOpenAttribute should not be aliased. - (Originally from FSComp.txt:1705) - - - - - The attribute type '%s' has 'AllowMultiple=false'. Multiple instances of this attribute cannot be attached to a single language element. - (Originally from FSComp.txt:270) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Additional constructor is not allowed. - (Originally from FSComp.txt:1697) - - - - - If a type uses both [<Sealed>] and [<AbstractClass>] attributes, it means it is static. Abstract member declarations are not allowed. - (Originally from FSComp.txt:1701) - - - - - Redundant arguments are being ignored in function '%s'. Expected %d but got %d arguments. - (Originally from FSComp.txt:1367) - - - - - Type inference caused an inference type variable to escape its scope. Consider adding type annotations to make your code less generic. - (Originally from FSComp.txt:1366) - - - - - Type inference caused the type variable %s to escape its scope. Consider adding an explicit type parameter declaration or adjusting your code to be less generic. - (Originally from FSComp.txt:1365) - - - - - Lowercase literal '%s' is being shadowed by a new pattern with the same name. Only uppercase and module-prefixed literals can be used as named patterns. - (Originally from FSComp.txt:1368) - - - - - The operator '%s' cannot be resolved. Consider opening the module 'Microsoft.FSharp.Linq.NullableOperators'. - (Originally from FSComp.txt:1339) - - - - - Unrecognized option: '%s'. Use '--help' to learn about recognized command line options. - (Originally from FSComp.txt:79) - - - - - The non-generic type '%s' does not expect any type arguments, but here is given %d type argument(s) - (Originally from FSComp.txt:36) - - - - - Filename '%s' contains invalid character '%s' - (Originally from FSComp.txt:1115) - - - - - The signature file '%s' 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. - (Originally from FSComp.txt:76) - - - - - A signature for the file or module '%s' has already been specified - (Originally from FSComp.txt:73) - - - - - The search directory '%s' could not be found - (Originally from FSComp.txt:50) - - - - - Problem with filename '%s': %s - (Originally from FSComp.txt:46) - - - - - Problem reading assembly '%s': %s - (Originally from FSComp.txt:1332) - - - - - The '--pdb' option requires the '--debug' option to be used - (Originally from FSComp.txt:48) - - - - - Option requires parameter: %s - (Originally from FSComp.txt:60) - - - - - No inputs specified - (Originally from FSComp.txt:47) - - - - - This file contains multiple declarations of the form 'module SomeNamespace.SomeModule'. Only one declaration of this form is permitted in a file. Change your file to use an initial namespace declaration and/or use 'module ModuleName = ...' to define your modules. - (Originally from FSComp.txt:59) - - - - - Files in libraries or multiple-file applications must begin with a namespace or module declaration, e.g. 'namespace SomeNamespace.SubNamespace' or 'module SomeNamespace.SomeModule'. Only the last source file of an application may omit such a declaration. - (Originally from FSComp.txt:57) - - - - - Invalid warning number '%s' - (Originally from FSComp.txt:43) - - - - - Invalid version string '%s' - (Originally from FSComp.txt:44) - - - - - Invalid version file '%s' - (Originally from FSComp.txt:45) - - - - - The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx or .fsscript - (Originally from FSComp.txt:63) - - - - - The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx or .fsscript. To enable the deprecated use of .ml or .mli extensions, use '--langversion:5.0' and '--mlcompatibility'. - (Originally from FSComp.txt:64) - - - - - The file extension of '%s' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli. - (Originally from FSComp.txt:62) - - - - - The search directory '%s' is invalid - (Originally from FSComp.txt:49) - - - - - Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private' - (Originally from FSComp.txt:53) - - - - - Invalid module or namespace name - (Originally from FSComp.txt:80) - - - - - Invalid directive. Expected '#time', '#time \"on\"' or '#time \"off\"'. - (Originally from FSComp.txt:71) - - - - - Invalid directive. Expected '#r \"<file-or-assembly>\"'. - (Originally from FSComp.txt:69) - - - - - Invalid directive. Expected '#load \"<file>\" ... \"<file>\"'. - (Originally from FSComp.txt:70) - - - - - Invalid directive. Expected '#I \"<path>\"'. - (Originally from FSComp.txt:68) - - - - - '%s' is not a valid filename - (Originally from FSComp.txt:51) - - - - - '%s' is not a valid assembly name - (Originally from FSComp.txt:52) - - - - - 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. - (Originally from FSComp.txt:56) - - - - - An implementation of file or module '%s' 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. - (Originally from FSComp.txt:74) - - - - - An implementation of the file or module '%s' has already been given - (Originally from FSComp.txt:75) - - - - - FSharp.Core.sigdata not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. - (Originally from FSComp.txt:1113) - - - - - File '%s' not found alongside FSharp.Core. File expected in %s. Consider upgrading to a more recent version of FSharp.Core, where this file is no longer be required. - (Originally from FSComp.txt:1114) - - - - - Error opening binary file '%s': %s - (Originally from FSComp.txt:66) - - - - - The source file '%s' (at position %d/%d) already appeared in the compilation list (at position %d/%d). Please verify that it is included only once in the project file. - (Originally from FSComp.txt:1695) - - - - - Directives inside modules are ignored - (Originally from FSComp.txt:72) - - - - - The F#-compiled DLL '%s' needs to be recompiled to be used with this version of F# - (Originally from FSComp.txt:67) - - - - - Could not resolve assembly '%s' - (Originally from FSComp.txt:65) - - - - - Source file '%s' could not be found - (Originally from FSComp.txt:61) - - - - - The file extensions '.ml' and '.mli' are for ML compatibility - (Originally from FSComp.txt:1101) - - - - - Unable to read assembly '%s' - (Originally from FSComp.txt:54) - - - - - Assembly resolution failure at or near this location - (Originally from FSComp.txt:55) - - - - - '%s' is not a valid integer argument - (Originally from FSComp.txt:77) - - - - - '%s' is not a valid floating point argument - (Originally from FSComp.txt:78) - - - - - A type cannot have both the 'ReferenceEquality' and 'StructuralEquality' or 'StructuralComparison' attributes - (Originally from FSComp.txt:222) - - - - - The 'StructuralEquality' attribute must be used in conjunction with the 'NoComparison' or 'StructuralComparison' attributes - (Originally from FSComp.txt:221) - - - - - The 'StructuralComparison' attribute must be used in conjunction with the 'StructuralEquality' attribute - (Originally from FSComp.txt:220) - - - - - A type with attribute 'ReferenceEquality' cannot have an explicit implementation of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - (Originally from FSComp.txt:224) - - - - - Only record, union, exception and struct types may be augmented with the 'ReferenceEquality', 'StructuralEquality' and 'StructuralComparison' attributes - (Originally from FSComp.txt:223) - - - - - The 'ReferenceEquality' attribute cannot be used on structs. Consider using the 'StructuralEquality' attribute instead, or implement an override for 'System.Object.Equals(obj)'. - (Originally from FSComp.txt:217) - - - - - The 'NoEquality' attribute must be used in conjunction with the 'NoComparison' attribute - (Originally from FSComp.txt:219) - - - - - A type with attribute 'NoEquality' should not usually have an explicit implementation of 'Object.Equals(obj)'. Disable this warning if this is intentional for interoperability purposes - (Originally from FSComp.txt:227) - - - - - A type with attribute 'NoComparison' should not usually have an explicit implementation of 'System.IComparable', 'System.IComparable<_>' or 'System.Collections.IStructuralComparable'. Disable this warning if this is intentional for interoperability purposes - (Originally from FSComp.txt:228) - - - - - This type uses an invalid mix of the attributes 'NoEquality', 'ReferenceEquality', 'StructuralEquality', 'NoComparison' and 'StructuralComparison' - (Originally from FSComp.txt:218) - - - - - A type with attribute 'CustomEquality' must have an explicit implementation of at least one of 'Object.Equals(obj)', 'System.IEquatable<_>' or 'System.Collections.IStructuralEquatable' - (Originally from FSComp.txt:225) - - - - - The 'CustomEquality' attribute must be used in conjunction with the 'NoComparison' or 'CustomComparison' attributes - (Originally from FSComp.txt:229) - - - - - A type with attribute 'CustomComparison' must have an explicit implementation of at least one of 'System.IComparable' or 'System.Collections.IStructuralComparable' - (Originally from FSComp.txt:226) - - - - - Error while parsing embedded IL type - (Originally from FSComp.txt:214) - - - - - Error while parsing embedded IL - (Originally from FSComp.txt:213) - - - - - Invalid expression on left of assignment - (Originally from FSComp.txt:216) - - - - - This indexer notation has been removed from the F# language - (Originally from FSComp.txt:215) - - - - - All elements of an array must be implicitly convertible to the type of the first element, which here is a tuple of length %d of type\n %s \nThis element is a tuple of length %d of type\n %s \n - (Originally from FSComp.txt:25) - - - - - All elements of an array must be implicitly convertible to the type of the first element, which here is '%s'. This element has type '%s'. - (Originally from FSComp.txt:24) - - - - - Interpolated string contains untyped identifiers. Adding typed format specifiers is recommended. - (Originally from FSComp.txt:1725) - - - - - Add . for indexer access. - (Originally from FSComp.txt:21) - - - - - Active pattern '%s' is not a function - (Originally from FSComp.txt:1104) - - - - - Active pattern '%s' has a result type containing type variables that are not determined by the input. The common cause is a when a result case is not mentioned, e.g. 'let (|A|B|) (x:int) = A x'. This can be fixed with a type constraint, e.g. 'let (|A|B|) (x:int) : Choice<int,unit> = A x' - (Originally from FSComp.txt:1105) - - - - - The mutable local '%s' is implicitly allocated as a reference cell because it has been captured by a closure. This warning is for informational purposes only to indicate where implicit allocations are performed. - (Originally from FSComp.txt:1357) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is virtual and the other isn't - (Originally from FSComp.txt:122) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe types differ - (Originally from FSComp.txt:114) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is static and the other isn't - (Originally from FSComp.txt:121) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled representation of this method is as a static member but the signature indicates its compiled representation is as an instance member - (Originally from FSComp.txt:127) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe respective type parameter counts differ - (Originally from FSComp.txt:113) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is marked as an override and the other isn't - (Originally from FSComp.txt:125) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a type function and the other is not. The signature requires explicit type parameters if they are present in the implementation. - (Originally from FSComp.txt:112) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is a constructor/property and the other is not - (Originally from FSComp.txt:126) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from FSComp.txt:106) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe literal constant values and/or attributes differ - (Originally from FSComp.txt:111) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled representation of this method is as an instance member, but the signature indicates its compiled representation is as a static member - (Originally from FSComp.txt:128) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe inline flags differ - (Originally from FSComp.txt:110) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe number of generic parameters in the signature and implementation differ (the signature declares %s but the implementation declares %s - (Originally from FSComp.txt:117) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe generic parameters in the signature and implementation have different kinds. Perhaps there is a missing [<Measure>] attribute. - (Originally from FSComp.txt:118) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is final and the other isn't - (Originally from FSComp.txt:124) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is an extension member and the other is not - (Originally from FSComp.txt:115) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe CLI member names differ - (Originally from FSComp.txt:120) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe display names differ - (Originally from FSComp.txt:108) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe compiled names differ - (Originally from FSComp.txt:107) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe mutability attributes differ - (Originally from FSComp.txt:105) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nAn arity was not inferred for this value - (Originally from FSComp.txt:116) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe arities in the signature and implementation differ. The signature specifies that '%s' is function definition or lambda expression accepting at least %s 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 %s: int -> (int -> int)\ninstead of\n\tval %s: int -> int -> int. - (Originally from FSComp.txt:119) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nThe accessibility specified in the signature is more than that specified in the implementation - (Originally from FSComp.txt:109) - - - - - Module '%s' contains\n %s \nbut its signature specifies\n %s \nOne is abstract and the other isn't - (Originally from FSComp.txt:123) - - - - - The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe types of the fields differ - (Originally from FSComp.txt:163) - - - - - The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from FSComp.txt:161) - - - - - The module contains the constructor\n %s \nbut its signature specifies\n %s \nThe respective number of data fields differ - (Originally from FSComp.txt:162) - - - - - The module contains the constructor\n %s \nbut its signature specifies\n %s \nthe accessibility specified in the signature is more than that specified in the implementation - (Originally from FSComp.txt:164) - - - - - Invalid recursive reference to an abstract slot - (Originally from FSComp.txt:970) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe types differ - (Originally from FSComp.txt:170) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'static' modifiers differ - (Originally from FSComp.txt:167) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe names differ - (Originally from FSComp.txt:165) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'mutable' modifiers differ - (Originally from FSComp.txt:168) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nThe 'literal' modifiers differ - (Originally from FSComp.txt:169) - - - - - The module contains the field\n %s \nbut its signature specifies\n %s \nthe accessibility specified in the signature is more than that specified in the implementation - (Originally from FSComp.txt:166) - - - - - The exception definitions are not compatible because the exception abbreviations in the signature and implementation differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:188) - - - - - The exception definitions are not compatible because a CLI exception mapping is being hidden by a signature. The exception mapping must be visible to other modules. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s - (Originally from FSComp.txt:185) - - - - - The exception definitions are not compatible because the order of the fields is different in the signature and implementation. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:192) - - - - - The exception definitions are not compatible because the field '%s' was required by the signature but was not specified by the implementation. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:190) - - - - - The exception definitions are not compatible because the field '%s' was present in the implementation but not in the signature. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:191) - - - - - The exception definitions are not compatible because the exception declarations differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:189) - - - - - The exception definitions are not compatible because the CLI representations differ. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s - (Originally from FSComp.txt:186) - - - - - The exception definitions are not compatible because the exception abbreviation is being hidden by the signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. The module contains the exception definition\n %s \nbut its signature specifies\n\t%s. - (Originally from FSComp.txt:187) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the types have different base types - (Originally from FSComp.txt:141) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because a type representation is being hidden by a signature - (Originally from FSComp.txt:147) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the types are of different kinds - (Originally from FSComp.txt:148) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature says this type may use nulls as an extra value but the implementation does not - (Originally from FSComp.txt:136) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature says this type may use nulls as a representation but the implementation does not - (Originally from FSComp.txt:135) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature is an abstract class but the implementation is not. Consider adding the [<AbstractClass>] attribute to the implementation. - (Originally from FSComp.txt:140) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature defines the %s '%s' but the implementation does not (or does, but not in the same order) - (Originally from FSComp.txt:143) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature declares a %s while the implementation declares a %s - (Originally from FSComp.txt:157) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature has an abbreviation while the implementation does not - (Originally from FSComp.txt:160) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the representations differ - (Originally from FSComp.txt:150) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the respective type parameter counts differ - (Originally from FSComp.txt:130) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the number of %ss differ - (Originally from FSComp.txt:142) - - - - - The %s definitions in the signature and implementation are not compatible because the names differ. The type is called '%s' in the signature file but '%s' in implementation. - (Originally from FSComp.txt:129) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the signature requires that the type supports the interface %s but the interface has not been implemented - (Originally from FSComp.txt:132) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation type is sealed but the signature implies it is not. Consider adding the [<Sealed>] attribute to the signature. - (Originally from FSComp.txt:137) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation says this type may use nulls as an extra value but the signature does not - (Originally from FSComp.txt:134) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation says this type may use nulls as a representation but the signature does not - (Originally from FSComp.txt:133) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation type is not sealed but signature implies it is. Consider adding the [<Sealed>] attribute to the implementation. - (Originally from FSComp.txt:138) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation is an abstract class but the signature is not. Consider adding the [<AbstractClass>] attribute to the signature. - (Originally from FSComp.txt:139) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation defines a struct but the signature defines a type with a hidden representation - (Originally from FSComp.txt:145) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the implementation defines the %s '%s' but the signature does not (or does, but not in the same order) - (Originally from FSComp.txt:144) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the IL representations differ - (Originally from FSComp.txt:149) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the field %s was present in the implementation but not in the signature - (Originally from FSComp.txt:151) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the field %s was required by the signature but was not specified by the implementation - (Originally from FSComp.txt:153) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the order of the fields is different in the signature and implementation - (Originally from FSComp.txt:152) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because 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'. - (Originally from FSComp.txt:154) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because a CLI type representation is being hidden by a signature - (Originally from FSComp.txt:146) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the accessibility specified in the signature is more than that specified in the implementation - (Originally from FSComp.txt:131) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the abstract member '%s' was present in the implementation but not in the signature - (Originally from FSComp.txt:156) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the abstract member '%s' was required by the signature but was not specified by the implementation - (Originally from FSComp.txt:155) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because the abbreviations differ: %s versus %s - (Originally from FSComp.txt:158) - - - - - The %s definitions for type '%s' in the signature and implementation are not compatible because an abbreviation is being hidden by a signature. The abbreviation must be visible to other CLI languages. Consider making the abbreviation visible in the signature. - (Originally from FSComp.txt:159) - - - - - The default value does not have the same type as the argument. The DefaultParameterValue attribute and any Optional attribute will be ignored. Note: 'null' needs to be annotated with the correct type, e.g. 'DefaultParameterValue(null:obj)'. - (Originally from FSComp.txt:1390) - - - - - The CallerMemberNameAttribute applied to parameter '%s' will have no effect. It is overridden by the CallerFilePathAttribute. - (Originally from FSComp.txt:1385) - - - - - Stopped due to error\n - (Originally from Interactive\FSIstrings.txt:2) - - - - - Prevents references from being locked by the F# Interactive process - (Originally from Interactive\FSIstrings.txt:55) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - Use the given file on startup as initial input - (Originally from Interactive\FSIstrings.txt:11) - - - - - Usage: %s <options> [script.fsx [<arguments>]] - (Originally from Interactive\FSIstrings.txt:3) - - - - - - Unexpected ThreadAbortException (Ctrl-C) during event handling: Trying to restart... - (Originally from Interactive\FSIstrings.txt:50) - - - - - --> Timing now on - (Originally from Interactive\FSIstrings.txt:48) - - - - - --> Timing now off - (Originally from Interactive\FSIstrings.txt:49) - - - - - Real: %s, CPU: %s, GC %s - (Originally from Interactive\FSIstrings.txt:25) - - - - - gen - (Originally from Interactive\FSIstrings.txt:26) - - - - - Treat remaining arguments as command line arguments, accessed using fsi.CommandLineArgs - (Originally from Interactive\FSIstrings.txt:13) - - - - - Support TAB completion in console (on by default) - (Originally from Interactive\FSIstrings.txt:18) - - - - - Suppress fsi writing to stdout - (Originally from Interactive\FSIstrings.txt:17) - - - - - F# Interactive for F# %s - (Originally from Interactive\FSIstrings.txt:54) - - - - - Microsoft (R) F# Interactive version %s - (Originally from Interactive\FSIstrings.txt:53) - - - - - Operation failed. The error text has been printed in the error stream. To return the corresponding FSharpDiagnostic use the EvalInteractionNonThrowing, EvalScriptNonThrowing or EvalExpressionNonThrowing - (Originally from Interactive\FSIstrings.txt:57) - - - - - Operation could not be completed due to earlier error - (Originally from Interactive\FSIstrings.txt:56) - - - - - Emit multiple assemblies (on by default) - (Originally from Interactive\FSIstrings.txt:58) - - - - - - MISCELLANEOUS - - (Originally from Interactive\FSIstrings.txt:8) - - - - - Loading - (Originally from Interactive\FSIstrings.txt:39) - - - - - #load the given file on startup - (Originally from Interactive\FSIstrings.txt:12) - - - - - Warning: line too long, ignoring some characters\n - (Originally from Interactive\FSIstrings.txt:24) - - - - - - LANGUAGE - - (Originally from Interactive\FSIstrings.txt:7) - - - - - '%s' is not a valid assembly name - (Originally from Interactive\FSIstrings.txt:22) - - - - - See '%s' for options - (Originally from Interactive\FSIstrings.txt:38) - - - - - F# Interactive command line options: - (Originally from Interactive\FSIstrings.txt:37) - - - - - F# Interactive directives: - (Originally from Interactive\FSIstrings.txt:28) - - - - - Toggle timing on/off - (Originally from Interactive\FSIstrings.txt:33) - - - - - Reference (dynamically load) the given DLL - (Originally from Interactive\FSIstrings.txt:29) - - - - - Exit - (Originally from Interactive\FSIstrings.txt:35) - - - - - Load the given file(s) as if compiled and referenced - (Originally from Interactive\FSIstrings.txt:32) - - - - - Display help - (Originally from Interactive\FSIstrings.txt:34) - - - - - Clear screen - (Originally from Interactive\FSIstrings.txt:36) - - - - - Add the given search path for referenced DLLs - (Originally from Interactive\FSIstrings.txt:30) - - - - - Include package source uri when searching for packages - (Originally from Interactive\FSIstrings.txt:31) - - - - - \n- Interrupt\n - (Originally from Interactive\FSIstrings.txt:40) - - - - - - INPUT FILES - - (Originally from Interactive\FSIstrings.txt:4) - - - - - Display this usage message (Short form: -?) - (Originally from Interactive\FSIstrings.txt:14) - - - - - Execute interactions on a Windows Forms event loop (on by default) - (Originally from Interactive\FSIstrings.txt:16) - - - - - Failed to resolve assembly '%s' - (Originally from Interactive\FSIstrings.txt:51) - - - - - \n- Exit...\n - (Originally from Interactive\FSIstrings.txt:41) - - - - - Exit fsi after loading the files or running the .fsx script given on the command line - (Originally from Interactive\FSIstrings.txt:15) - - - - - Exception raised when starting remoting server.\n%s - (Originally from Interactive\FSIstrings.txt:10) - - - - - \n\nException raised during pretty printing.\nPlease report this so it can be fixed.\nTrace: %s\n - (Originally from Interactive\FSIstrings.txt:27) - - - - - - ERRORS AND WARNINGS - - (Originally from Interactive\FSIstrings.txt:6) - - - - - Functions with [<EntryPoint>] are not invoked in FSI. '%s' was not invoked. Execute '%s <args>' in order to invoke '%s' with the appropriate string array of command line arguments. - (Originally from Interactive\FSIstrings.txt:59) - - - - - Emit debug information in quotations - (Originally from Interactive\FSIstrings.txt:19) - - - - - Directory '%s' doesn't exist - (Originally from Interactive\FSIstrings.txt:23) - - - - - --> Referenced '%s' (an assembly with a different timestamp has already been referenced from this location, reset fsi to load the updated assembly) - (Originally from Interactive\FSIstrings.txt:46) - - - - - --> Referenced '%s' (file may be locked by F# Interactive process) - (Originally from Interactive\FSIstrings.txt:45) - - - - - --> Referenced '%s' - (Originally from Interactive\FSIstrings.txt:44) - - - - - --> Added '%s' to library include path - (Originally from Interactive\FSIstrings.txt:47) - - - - - Failed to install ctrl-c handler - Ctrl-C handling will not be available. Error was:\n\t%s - (Originally from Interactive\FSIstrings.txt:43) - - - - - 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'. - (Originally from Interactive\FSIstrings.txt:21) - - - - - - CODE GENERATION - - (Originally from Interactive\FSIstrings.txt:5) - - - - - Binding session to '%s'... - (Originally from Interactive\FSIstrings.txt:52) - - - - - For help type #help;; - (Originally from Interactive\FSIstrings.txt:20) - - - - - - ADVANCED - - (Originally from Interactive\FSIstrings.txt:9) - - - - - - Aborting main thread... - (Originally from Interactive\FSIstrings.txt:42) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - %s for F# %s - (Originally from Facilities\UtilsStrings.txt:2) - - - - - Microsoft (R) F# Compiler version %s - (Originally from Facilities\UtilsStrings.txt:1) - - - - - 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 <c>ArgumentException</c> is - raised.. - - - - - 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. - - - - - Return an array containing the given element. - - - - - Like <c>foldBack</c>, but return both the intermediary and final results. - - - - - Like <c>fold</c>, but return the intermediary and final results. - - - - - 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 <c>ArgumentException</c> is - raised. - - - - - 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 <c>ArgumentException</c> is raised. - - - - - Return True if the given array is empty, otherwise False. - - - - - Test elements of the two arrays pairwise to see if all pairs of elements satisfy the given predicate. - Raise <c>ArgumentException</c> if the arrays have different lengths. - - - - - 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 <c>ArgumentException</c> 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 <c>ArgumentException</c> is - raised. - - - - - Apply a function to each element of the array, threading an accumulator argument - through the computation. If the input function is <c>f</c> and the elements are <c>i0...iN</c> then - computes <c>f i0 (...(f iN-1 iN))</c>. 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 <c>f</c> and the elements are <c>i0...iN</c> - then computes <c>f (... (f i0 i1)...) iN</c>. Raises ArgumentException if the array has size zero. - - - - - Return the index of the first element in the array - that satisfies the given predicate. Raise <c>KeyNotFoundException</c> if - none of the elements satisfy the predicate. - - - - - Return the index of the first element in the array - that satisfies the given predicate. Raise <c>KeyNotFoundException</c> if - none of the elements satisfy the predicate. - - - - - 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. - - - - - Return a view of the array as an enumerable object. - - - - - Build a <c>ResizeArray</c> from the given elements. - - - - - Return a fixed-length array containing the elements of the input <c>ResizeArray</c>. - - - - - Sort the elements using the key extractor and generic comparison on the keys. - - - - - Sort the elements using the given comparison function. - - - - - Return a new array with the elements in reverse order. - - - - - Apply the given function to successive elements, returning the first - result where function returns Some(x) for some x. - - - - - Return the first element for which the given function returns True. - Return None if no such element exists. - - - - - Return the first element for which the given function returns True. - Raise <c>KeyNotFoundException</c> if no such element exists. - - - - - 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 <c>Some(x)</c>. - - - - - Split the collection into two collections, containing the - elements for which the given predicate returns True and False - respectively. - - - - - Return a new collection containing only the elements of the collection - for which the given predicate returns True. - - - - - Test if all elements of the array satisfy the given predicate. - If the input function is <c>f</c> and the elements are <c>i0...iN</c> and "j0...jN" - then computes <c>p i0 && ... && p iN</c>. - - - - - Test if any element of the array satisfies the given predicate. - If the input function is <c>f</c> and the elements are <c>i0...iN</c> - then computes <c>p i0 or ... or p iN</c>. - - - - - 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. - - - - - Apply the given function to each element of the array. 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 the corresponding elements of the two collections pairwise. The two input - arrays must have the same lengths. - - - - - Apply the given function to two arrays simultaneously. The - two arrays must have the same lengths, otherwise an Invalid_argument exception is - raised. - - - - - Build a new array whose elements are the results of applying the given function - to each of the elements of the array. - - - - - Apply the given function to each element of the array. - - - - - Apply a function to each element of the array, threading an accumulator argument - through the computation. If the input function is <c>f</c> and the elements are <c>i0...iN</c> then - computes <c>f i0 (...(f iN s))</c>. - - - - - Apply a function to each element of the collection, threading an accumulator argument - through the computation. If the input function is <c>f</c> and the elements are <c>i0...iN</c> - then computes <c>f (... (f s i0)...) iN</c> - - - - - Build an array from the given list. - - - - - Build a list from the given array. - - - - - Read a range of elements from the first array and write them into the second. - - - - - Fill a range of the collection with the given element. - - - - - Build a new array that contains the elements of the given array. - - - - - Build a new array that contains the given subrange specified by - starting index and length. - - - - - 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 first array followed by the elements of the second array. - - - - - Create an array by calling the given generator on each index. - - - - - Create an array whose elements are all initially the given value. - - - - - Set the value of an element in the collection. You can also use the syntax <c>arr.[idx] <- e</c>. - - - - - Fetch an element from the collection. You can also use the syntax <c>arr.[idx]</c>. - - - - - Return the length of the collection. You can also use property <c>arr.Length</c>. - - - - - Generic operations on the type System.Collections.Generic.List, which is called ResizeArray in the F# libraries. - - - - - Calculates the edit distance between two strings. - The edit distance is a metric that allows to measure the amount of difference between two strings - and shows how many edit operations (insert, delete, substitution) are needed to transform one string into the other. - - - - - Calculates the Jaro-Winkler edit distance between two strings. - The edit distance is a metric that allows to measure the amount of similarity between two strings. - - - - - Lookup or set the given element in the table. Set replaces all existing bindings for a value with a single - bindings. Raise <c>KeyNotFoundException</c> 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 <c>KeyNotFoundException</c> 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. - - - - - Clear all elements from the collection. - - - - - Add a binding for the element to the table. - - - - - Build a map that contains the bindings of the given IEnumerable. - - - - - Create a new empty mutable HashMultiMap with an internal bucket array of the given approximate size - and with the given key hash/equality functions. - - - - - Create a new empty mutable HashMultiMap with the given key hash/equality functions. - - - - - Hash tables, by default based on F# structural "hash" and (=) functions. - The table may map a single key to multiple bindings. - - - - - Maps with a specific comparison function - - - - - Sets with a specific comparison function - - - - - Get the value for the given key or <c>None</c> if not still valid. Skips `areSame` checking unless `areSimilar` is not provided. - - - - - Get the value for the given key or None, but only if entry is still valid. Skips `areSame` checking unless `areSimilar` is not provided. - - - - - Get the value for the given key or <c>None</c> if not still valid. - - - - - Get the value for the given key or None, but only if entry is still valid - - - - - Set the given key. - - - - - Resize - - - - - Remove the given value from the mru cache. - - - - - Get the similar (subsumable) value for the given key or <c>None</c> if not already available. - - - - - Clear out the cache. - - - - - 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. - - Concurrency: This collection is thread-safe, though concurrent use may result in different - threads seeing different live sets of cached items. - - - areSimilar: Keep at most once association for two similar keys (as given by areSimilar) - - - - - Lookup the value without making it the most recent. - Returns the original key value because the areSame function - may have unified two different keys. - - - - - Lookup a value and make it the most recent. - Returns the original key value because the areSame function - may have unified two different keys. - - - - - Lookup a value and make it the most recent. Return <c>None</c> if it wasn't there. - - - - - Resize - - - - - Remove the given value from the collection. - - - - - Add an element to the collection. Make it the most recent. - - - - - Remove all elements. - - - - - 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. - - - areSimilar: Keep at most once association for two similar keys (as given by areSimilar) - - - - - Iterable functional collection with O(1) append-1 time. Useful for data structures where elements get added at the - end but the collection must occasionally be iterated. Iteration is slower and may allocate because - a suffix of elements is stored in reverse order. - - The type doesn't support structural hashing or comparison. - - - - - Lookup an element in the map. Raise <c>KeyNotFoundException</c> 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 another for 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 <c>IEnumerable</c> - 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. Keys are ordered by construction function specified - when creating empty maps or by F# structural comparison if no - construction function is specified. - - <performance> - 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. - </performance> - Immutable maps. A constraint tag carries information about the class of key-comparers being used. - - - - - 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 <c>Set.isEmpty</c>. See the <c>Set</c> 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 <c>Set.remove</c>. 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 <c>Set</c> module for further operations on sets. - - - - - Build two new sets, one containing the elements for which the given predicate returns True, - and another with 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 <c>Set.contains</c>. See the <c>Set</c> 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 <c>Set.add</c>. 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 <c>Set</c> module for further operations on sets. - - - - - Immutable sets based on binary trees, default tag - Immutable sets where a constraint tag carries information about the class of key-comparer being used. - - - - - Immutable map collection, with explicit flattening to a backing dictionary - - - - - Interface that defines methods for comparing objects using partial equality relation - - - - - 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 - - - - - A thread-safe lookup table which is assigning an auto-increment stamp with each insert - - - - - Memoize tables (all entries cached, never collected unless whole table is collected) - - - - - Generates unique stamps - - - - - Represents a synchronous, cold-start, cancellable computation with explicit representation of a cancelled result. - - A cancellable computation may be cancelled via a CancellationToken, which is propagated implicitly. - If cancellation occurs, it is propagated as data rather than by raising an OperationCanceledException. - - - - - Encapsulates a lock associated with a particular token-type representing the acquisition of that lock. - - - - - A base type for various types of tokens that must be passed when a lock is taken. - Each different static lock should declare a new subtype of this type. - - - - - Represents a token that indicates execution on any of several potential user threads calling the F# compiler services. - - - - - Represents a token that indicates execution on the compilation thread, i.e. - - we have full access to the (partially mutable) TAST and TcImports data structures - - compiler execution may result in type provider invocations when resolving types and members - - we can access various caches in the SourceCodeServices - - Like other execution tokens this should be passed via argument passing and not captured/stored beyond - the lifetime of stack-based calls. This is not checked, it is a discipline within the compiler code. - - - - - Represents a permission active at this point in execution - - - - - For every entry in m2 find an entry in m1 and fold - - - - - Union entries by identical key, using the provided function to union sets of values - - - - - Not a very useful function - only called in one place - should be changed - - - - - Like Seq.distinctBy but only filters out duplicates for some of the elements - - - - - Interface that defines methods for comparing objects using partial equality relation - - - - - Intern tables to save space. - - - - - Bind the cancellation token associated with the computation - - - - - Run the computation in a mode where it may not be cancelled. The computation never results in a - ValueOrCancelled.Cancelled. - - - - - Run a cancellable computation using the given cancellation token - - - - - Represents a place in the compiler codebase where we assume we are executing on a compilation thread - - - - - Represents a place in the compiler codebase where we are passed a CompilationThreadToken unnecessarily. - This represents code that may potentially not need to be executed on the compilation thread. - - - - - Represents a place where we are stating that execution on the compilation thread is required. The - reason why will be documented in a comment in the code at the callsite. - - - - - Splits a string into substrings based on the strings in the array separators - - - - - Split a large ResizeArray into a series of array chunks that are each under the Large Object Heap limit. - This is done to help prevent a stop-the-world collection of the single large array, instead allowing for a greater - probability of smaller collections. Stop-the-world is still possible, just less likely. - - - - - Split a ResizeArray into an array of smaller chunks. - This requires `items/chunkSize` Array copies of length `chunkSize` if `items/chunkSize % 0 = 0`, - otherwise `items/chunkSize + 1` Array copies. - - - - - Returns true if one array has trailing elements equal to another's. - - - - - Returns true if one array has another as its subset from index 0. - - - - - Check if subArray is found in the wholeArray starting at the provided index - - - - - Returns all heads of a given array. - - - - - Optimized arrays equality. ~100x faster than `array1 = array2` on strings. - ~2x faster for floats - ~0.8x slower for ints - - - - - Returns a new array with an element replaced with a given value. - - - - - Async implementation of Array.map. - - - - - pass an array byref to reverse it in place - - - - - Indicates that a type may be null. 'MaybeNull<string>' is used internally in the F# compiler as - replacement for 'string?' to align with FS-1060. - - - - - Runs the computation synchronously, always starting on the current thread. - - - - - Get an initialization hole - - - - - Per the docs the threshold for the Large Object Heap is 85000 bytes: https://learn.microsoft.com/dotnet/standard/garbage-collection/large-object-heap#how-an-object-ends-up-on-the-large-object-heap-and-how-gc-handles-them - We set the limit to be 80k to account for larger pointer sizes for when F# is running 64-bit. - - - - - Checks the argument is non-null - - - - - Asserts the argument is non-null and raises an exception if it is - - - - - Match on the nullness of an argument. - - - - - Asserts the argument is non-null and raises an exception if it is - - - - - Returns true if the argument is non-null. - - - - - Returns true if the list contains exactly 1 element. Otherwise false. - - - - - Returns true if the list has less than 2 elements. Otherwise false. - - - - - Logical shift right treating int32 as unsigned integer. - Code that uses this should probably be adjusted to use unsigned integer types. - - - - - Register some items to dispose - - - - - Track a set of resources to cleanup - - - - - Caches, mainly for free variables - - - - - 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. - - - - - Like Append, but returns unit - - - - - Writing to output stream via a string buffer. - - - - - Buffer printing utility - - - - - Specialized parallel functions for an array. - Different from Array.Parallel as it will try to minimize the max degree of parallelism. - Will flatten aggregate exceptions that contain one exception. - - - - - Note: if duplicates appear, keep the ones toward the _front_ of the list - - - - - NOTE: not tail recursive! - - - - - NOTE: quadratic! - - - - - NOTE: O(n)! - - - - - NOTE: O(n)! - - - - - 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 and returns None if value does not exist. - - - - - 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. - - - - - Get the most significant byte of a 32-bit integer - - - - - Get the 3rd least significant byte of a 32-bit integer - - - - - Get the 2nd least significant byte of a 32-bit integer - - - - - Get the least significant byte of a 32-bit integer - - - - - Rational arithmetic, used for exponents on units-of-measure - - - - - Map a directory name with its replacement. - Prefixes are compared case sensitively. - - - - - Map a file path with its replacement. - Prefixes are compared case sensitively. - - - - - Add a path mapping to the map. - - - - - Interpret tables for a unicode lexer generated by <c>fslex.exe</c>. - - - - - Create the tables from raw data - - - - - The type of tables for an unicode lexer generated by <c>fslex.exe</c>. - - - - - 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. - - - - - Determines if the parser can report FSharpCore library-only features. - - - - - The currently matched text as a Span, it is only valid until the lexer is advanced - - - - - Get the language version being supported - - - - - 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. - - - - - True if the specified language feature is supported. - - - - - Fast helper to turn the matched characters into a string, avoiding an intermediate array. - - - - - Determine if Lexeme contains a specific character - - - - - Get single character of matched string - - - - - Create a lex buffer backed by source text. - - - - - Create a lex buffer that reads character or byte inputs by using the given function. - - - - - Create a lex buffer suitable for Unicode lexing that reads characters from the given array. - Important: does take ownership of the array. - - - - - Logs a recoverable error if a language feature is unsupported, at the specified range. - - - - - Input buffers consumed by lexers generated by <c>fslex.exe</c>. - The type must be generic to match the code generated by FsLex and FsYacc (if you would like to - fix this, please submit a PR to the FsLexYacc repository allowing for optional emit of a non-generic type reference). - - - - - Return absolute offset of the start of the line marked by the position. - - - - - The character number in the input stream. - - - - - The line number for the position in the input stream, assuming fresh positions have been updated - using for the new line. - - - - - The line number in the input stream, assuming fresh positions have been updated - for the new line by modifying the EndPos property of the LexBuffer. - - - - - The file index for the file associated with the input stream, use <c>fileOfFileIndex</c> to decode - - - - - Given a position just beyond the end of a line, return a position at the start of the next line. - - - - - Get an arbitrary position, with the empty string as file name. - - - - - Same line, column -1. - - - - - Return the column number marked by the position, - i.e. the difference between the <c>AbsoluteOffset</c> and the <c>StartOfLineAbsoluteOffset</c> - - - - - Gives a position shifted by specified number of characters. - - - - - Given a position at the start of a token of length n, return a position just beyond the end of the token. - - - - - Apply a #line directive. - - - - - Position information stored for lexing tokens - - - - - The tag of the error terminal. - - - - - The total number of terminals. - - - - - This function is used to hold the user specified "parse_error" or "parse_error_rich" functions. - - - - - This table is logically part of the Goto table. - - - - - The sparse table offsets for the productions active for each state. - - - - - The sparse table for the productions active for each state. - - - - - The sparse goto table row offsets. - - - - - The sparse goto table. - - - - - The immediate action table. - - - - - The number of symbols for each reduction. - - - - - The sparse action table row offsets. - - - - - The sparse action table elements. - - - - - A function to compute the data carried by a token. - - - - - A function to compute the tag of a token. - - - - - The token number indicating the end of input. - - - - - The reduction table. - - - - - Interpret the parser table taking input from the given lexer, using the given lex buffer, and the given start state. - Returns an object indicating the final synthesized value for the parse. - - - - - Tables generated by fsyacc - The type of the tables contained in a file produced by the <c>fsyacc.exe</c> parser generator. - - - - - The stack of state indexes active at the parse error . - - - - - The token that would cause a shift at the parse error. - - - - - The stack of productions that would be reduced at the parse error. - - - - - The tokens that would cause a reduction at the parse error. - - - - - The state active at the parse error. - - - - - The message associated with the parse error. - - - - - The token that caused the parse error. - - - - - The context provided when a parse error occurs. - - - - - Get the start of the range of positions matched by the production. - - - - - Get the full range of positions matched by the production. - - - - - Get the end of the range of positions matched by the production. - - - - - Return the LexBuffer for this parser instance. - - - - - Raise an error in this parse context. - - - - - Get the start position for the terminal or non-terminal at a given index matched by the production. - - - - - Get the start and end position for the terminal or non-terminal at a given index matched by the production. - - - - - Get the end position for the terminal or non-terminal at a given index matched by the production. - - - - - Get the value produced by the terminal or non-terminal at the given position. - - - - - Indicates a parse error has occurred and parse recovery is in progress. - - - - - Indicates an accept action has occurred. - - - - - The default implementation of the parse_error function. - - - - - The default implementation of the parse_error_rich function. - - - - - Helpers used by generated parsers. - - - - - Auxiliary function for `Continuation.sequence` that assumes the recursions return a 'T list. - In the final continuation the `'T list list` will first be concatenated into one list, before being passed to the (final) `continuation`. - - - - - This function sequences computations that have been expressed in continuation-passing style. - Concretely, when 'T is `int` as an example, can be expressed in continuation-passing style as a function, - taking as its input another function that is "how to proceed with a computation given the value of the integer", - and returning "the result of that computation". - That is, an integer is equivalently represented as a generic function (howToProceed : int -> 'TReturn) -> 'TReturn, - and the effect of the function corresponding to the integer 3 is simply to apply the input `howToProceed` to the value 3. - - The motivation for Continuation.sequence is most easily understood when it is viewed without its second argument: - it is a higher-order function that takes "a list of 'T expressed in continuation-passing style", and returns "a 'T list expressed in continuation-passing style". - The resulting "continuation-passing 'T list" operates by chaining the input 'Ts together, and finally returning the result of continuing the computation after first sequencing the inputs. - - Crucially, this technique can be used to enable unbounded recursion: - it constructs and invokes closures representing intermediate stages of the sequenced computation on the heap, rather than consuming space on the (more constrained) stack. - - - - - Test to report for the name of the type provider that produced the value - - - - - The ILScopeRef of the runtime assembly reference for type provider that produced the value - - - - - A type provider that produced the value - - - - - Apply an operation and 'untaint' the result. This can be used if the return type - is guaranteed not to be implemented by a type provider - - - - - Apply an operation and 'untaint' the result. The result must be marshallable. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation that returns an option. Unwrap option. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. No exception may be raised by 'f' - - - - - Apply an operation that returns an array. Unwrap array. Any exception will be attributed to the type provider with an error located at the given range. String is method name of thing-returning-array, to diagnostically attribute if it is null - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Apply an operation. Any exception will be attributed to the type provider with an error located at the given range - - - - - Conditionally coerce the value - - - - - Create an initial tainted value - - - - - Assert that the value is of 'U and coerce the value. - If coercion fails, the failure will be blamed on a type provider - - - - - This struct wraps a value produced by a type provider to properly attribute any failures. - - - - - creates new instance of TypeProviderError with specified type\method names - - - - - creates new instance of TypeProviderError based on current instance information(message) - - - - - provides uniform way to process aggregated errors - - - - - creates new instance of TypeProviderError that represents collection of errors - - - - - creates new instance of TypeProviderError that represents one error - - - - - Stores and transports aggregated list of errors reported by the type provider - - - - - Determines if an assembly is in the core set of assemblies with high likelihood of - being shared amongst a set of common scripting references - - - - - Gets the selected target framework moniker, e.g netcore3.0, net472, and the running rid of the current machine - - - - - Resolves the references for a chosen or currently-executing framework, for - - script execution - - script editing - - script compilation - - out-of-project sources editing - - default references for fsc.exe - - default references for fsi.exe - - - - - Whether or not this file should be a single-file project - - - - - A helpers for dealing with F# files. - - - - - Whether or not this file is compilable - - - - - Return true if this is a subcategory of error or warning message that the language service can emit - - - - - Return the language ID, which is the expression evaluator id that the debugger will use. - - - - - Return the compilation defines that should be used when editing the given file. - - - - - These are the names of assemblies that should be referenced for .fs or .fsi files that - are not associated with a project. - - - - - The default location of FSharp.Core.dll and fsc.exe based on the version of fsc.exe that is running - - - - - Information about the compilation environment - - - - - Creates a ByteStorage that has a copy of the given Memory<byte>. - - - - - Creates a ByteStorage that has a copy of the given ByteMemory. - - - - - Creates a ByteStorage whose backing bytes are the given ByteMemory. Does not make a copy. - - - - - Creates a ByteStorage that has a copy of the given byte array. - - - - - Creates a ByteStorage whose backing bytes are the given byte array. Does not make a copy. - - - - - Imperative buffers and streams of byte[] - Not thread safe. - - - - - Create a default implementation of the file system - - - - - Represents a default (memory-mapped) implementation of the file system - - - - - Open the file for writing. Returns a Stream. - - - - - Open the file for read, returns ByteMemory, uses either FileStream (for smaller files) or MemoryMappedFile (for potentially big files, such as dlls). - - - - - Removes relative parts from any full paths - - - - - Used to determine if a file will not be subject to deletion during the lifetime of a typical client process. - - - - - A shim over Path.IsPathRooted - - - - - A shim over Path.IsInvalidPath - - - - - A shim over Path.GetTempPath - - - - - Utc time of the last modification - - - - - Take in a file name with an absolute path, and return the same file name - but canonicalized with respect to extra path separators (e.g. C:\\\\foo.txt) - and '..' portions - - - - - Take in a directory, filename, and return canonicalized path to the file name in directory. - If file name path is rooted, ignores directory and returns file name path. - Otherwise, combines directory with file name and gets full path via GetFullPathShim(string). - - - - - A shim for getting directory name from path - - - - - A shim over File.Exists - - - - - A shim over File.Delete - - - - - A shim over Directory.EnumerateFiles - - - - - A shim over Directory.EnumerateDirectories - - - - - A shim over Directory.Exists - - - - - A shim over Directory.Delete - - - - - A shim over Directory.Exists, but returns a string, the FullName of the resulting - DirectoryInfo. - - - - - A shim over Path.ChangeExtension - - - - - Represents a shim for the file system - - - - - Default implementation for IAssemblyLoader - - - - - Used to load type providers and located assemblies in F# Interactive - - - - - Used to load a dependency for F# Interactive and in an unused corner-case of type provider loading - - - - - Type which we use to load assemblies. - - - - - Gets a ByteMemory object that is empty - - - - - Empty byte memory. - - - - - Creates a ByteMemory object that is backed by a raw pointer. - Use with care. - - - - - Create a ByteMemory object that has a backing memory mapped file. - - - - - Creates a ByteMemory object that is backed by a byte array. - - - - - Creates a ByteMemory object that is backed by a byte array with the specified offset and length. - - - - - Get a stream representation of the backing memory. - Disposing this will not free up any of the backing memory. - - - - - Get a stream representation of the backing memory. - Disposing this will not free up any of the backing memory. - Stream cannot be written to. - - - - - A view over bytes. - May be backed by managed or unmanaged memory, or memory mapped file. - - - - - The global hook into the file system - - - - - Checks whether file is dll (ends in .dll) - - - - - Trim the quotes and spaces from either end of a string - - - - - Get the file name without extension of the given path. - - - - - Get the file name of the given path. - - - - - Return True if the path has a "." extension. - - - - chopExtension f removes the extension from the given - file name. Raises ArgumentException if no extension is present. - - - checkSuffix f s returns True if file name "f" ends in suffix "s", - e.g. checkSuffix "abc.fs" ".fs" returns true. - Disregards casing, e.g. checkSuffix "abc.Fs" ".fs" returns true. - - - - Filesystem helpers - - - - - MemoryMapped extensions - - - - - each int will be 0 <= x <= 255 - - - - - each int must be 0 <= x <= 255 - - - - - returned int will be 0 <= x <= 255 - - - - - Get the text used to specify the version, several of which may map to the same version - - - - - Get the list of valid versions - - - - - Get the list of valid options - - - - - Get the specified LanguageVersion as a string - - - - - Get the specified LanguageVersion - - - - - Has preview been explicitly specified - - - - - Does the selected LanguageVersion support the specified feature - - - - - Has been explicitly specified as 4.6, 4.7 or 5.0 - - - - - Get a version string associated with the given feature. - - - - - Get a string name for the given feature. - - - - - Get the list of valid versions - - - - - Create a LanguageVersion management object - - - - - LanguageVersion management - - - - - LanguageFeature enumeration - - - - - Coordinating compiler operations - configuration, loading initial context, reporting errors etc. - - - - - This represents the global state established as each task function runs as part of the build. - - Use to reset error and warning handlers. - - - - - Execute the new function, on a new thread if necessary - - - - - Indicates whether a language feature check should be skipped. Typically used in recursive functions - where we don't want repeated recursive calls to raise the same diagnostic multiple times. - - - - - The result type of a computational modality to collect warnings and possibly fail - - - - - Thread statics for the installed diagnostic logger - - - - - Represents a DiagnosticsLogger that captures all diagnostics, optionally formatting them - eagerly. - - - - - Get the number of error diagnostics reported - - - - - Emit a diagnostic to the logger - - - - - Checks if ErrorCount > 0 - - - - - Represents a capability to log diagnostics - - - - - This is the textual subcategory to display in error and warning messages (shows only under --vserrors): - - file1.fs(72): subcategory warning FS0072: This is a warning message - - - - - - Return true if the textual phase given is from the compile part of the build process. - This set needs to be equal to the set of subcategories that the language service can produce. - - - - - Return true if this phase is one that's known to be part of the 'compile'. This is the initial phase of the entire compilation that - the language service knows about. - - - - - Construct a phased error - - - - - Closed enumeration of build phases. - - - - - An exiter that raises StopProcessingException if Exit is called, saving the exit code in ExitCode. - - - - - Represnts an early exit from parsing, checking etc, for example because 'maxerrors' has been reached. - - - - - Represents the style being used to format errors - - - - - fixes given string by replacing all control chars with spaces. - NOTE: newlines are recognized and replaced with stringThatIsAProxyForANewlineInFlatErrors (ASCII 29, the 'group separator'), - which is decoded by the IDE with 'NewlineifyErrorString' back into newlines, so that multi-line errors can be displayed in QuickInfo - - - - - Stop on first error. Accumulate warnings and continue. - - - - - Stop on first error. Accumulate warnings and continue. - - - - - The bind in the monad. Stop on first error. Accumulate warnings and continue. - <remarks>Not meant for direct usage. Used in other inlined functions</remarks> - - - - - Reports an informational diagnostic - - - - - Reports an error and raises a ReportedError exception - - - - - Reports a warning diagnostic - - - - - Reports an error diagnostic and continues - - - - - NOTE: The change will be undone when the returned "unwind" object disposes - - - - - NOTE: The change will be undone when the returned "unwind" object disposes - - - - - Represents a DiagnosticsLogger that ignores diagnostics and asserts - - - - - Represents a DiagnosticsLogger that discards diagnostics - - - - - An exiter that quits the process if Exit is called. - - - - - Creates a DiagnosticEnabledWithLanguageFeature whose text comes via SR.* - - - - - Creates a DiagnosticWithSuggestions whose text comes via SR.* - - - - - Creates a diagnostic exeption whose text comes via SR.* - - - - - A diagnostic that is raised when enabled manually, or by default with a language feature - - - - - Represents a diagnostic exeption whose text comes via SR.* - - - - - Thrown when we stop processing the F# Interactive entry or #load. - - - - - 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') - - The exception that caused the report is carried as data because in some - situations (LazyWithContext) we may need to re-report the original error - when a lazy thunk is re-evaluated. - - - - - Thrown when we want to add some range information to a .NET exception - - - - - Like ErrorRecover by no range is attached to System.Exception and ArgumentException. - - - - - Perform error recovery from an exception if possible, including catching StopProcessingExn - - - - - Perform error recovery from an exception if possible. - - StopProcessingExn is not caught. - - ReportedError is caught and ignored. - - TargetInvocationException is unwrapped - - If precisely a System.Exception or ArgumentException then the range is attached as InternalError. - - Other exceptions are unchanged - - All are reported via the installed diagnostics logger - - - - - Simulates a diagnostic. For test purposes only. - - - - - Report a diagnostic as an error and raise `ReportedError` - - - - - Report a diagnostic as a warning and recover - - - - - Report a diagnostic as an error and recover - - - - - Instruct the exception not to reset itself when thrown again. - - - - - Literal build phase subcategory strings. - - - - - Demangles a suggestion - - - - - We report a candidate if its edit distance is <= the threshold. - The threshold is set to about a quarter of the number of characters. - - - - - Functions to format error message details - - - - - 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 evaluation of IEnumerable objects - to a small, finite depth, as determined by the printing parameters. - This may lead to additional computation being performed during printing. - - - - - 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. - - - - - Gets the text - - - - - Gets the tag - - - - - Creates text with a tag - - - - - Represents text with a tag - - - - - Represents the tag of some tagged text - - - - - Data representing joints in structured layouts of terms. The representation - of this data type is only for the consumption of formatting engines. - - - - - Represents a range using zero-based line counting (used by Visual Studio) - - - - - Represents a position using zero-based line counting (used by Visual Studio) - - - - - Represents a line number when using zero-based line counting (used by Visual Studio) - - - - - Represents a range within a file - - - - - The range where all values are zero - - - - - The empty range that is located at the start position of the range - - - - - The start line of the range - - - - - The start column of the range - - - - - The start position of the range - - - - - When de-sugaring computation expressions we convert a debug point into a plain range, and then later - recover that the range definitely indicates a debug point. - - - - - Synthetic marks ranges which are produced by intermediate compilation phases. This - bit signifies that the range covers something that should not be visible to language - service operations like dot-completion. - - - - - The file name for the file of the range - - - - - The file index for the range - - - - - The empty range that is located at the end position of the range - - - - - The line number for the end position of the range - - - - - The column number for the end position of the range - - - - - The end position of the range - - - - - Note that a range indicates a debug point - - - - - Convert a range to be synthetic - - - - - Check if the range is adjacent to another range - - - - - Represents a range within a file - - - - - Represents a position in a file - - - - - The line number for the position - - - - - The maximum number of bits needed to store an encoded position - - - - - The encoding of the position as a 64-bit integer - - - - - The column number for the position - - - - - Check if the position is adjacent to another postition - - - - - Decode a position fro a 64-bit integer - - - - - Represents a position in a file - - - - - Notes that a range is related to an implied "Delay"m "Quote" or "Run" at the entry to a computation expression. THis doesn't - apply to the "Delay" calls added for try/with, try/finally, while or for constructs. - - - - - Notes that a range is related to a sequential "a; b" translated to a "Combine" call in a computation expression - - This doesn't include "expr; cexpr" sequentials where the "expr" is a side-effecting simple statement - This does include "expr; cexpr" sequentials where the "expr" is interpreted as an implicit yield + Combine call - - - - - Notes that a range is related to a "with" in a "try/with" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "finally" in a "try/finally" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "let" or other binding range in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "try" in a "try/with" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "in" in a "for .. in ... do" or "to" in "for .. = .. to .. do" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "for" in "for .. do" in a computation, list, array or sequence expression - - - - - Notes that a range is related to a "while" in "while .. do" in a computation, list, array or sequence expression - - - - - An index into a global tables of filenames - - - - - Render a Layout yielding an 'a using a 'b (hidden state) type - - - - - An enhancement to TaggedText in the TaggedText layouts generated by FSharp.Compiler.Service - - - - - Gets the total length of the input in characters - - - - - Gets a character in an input based on an index of characters from the start of the file - - - - - Checks if a section of the input is equal to the given string - - - - - Gets a section of the input - - - - - Gets a section of the input based on a given range. - <exception cref="System.ArgumentException">Throws an exception when the input range is outside the file boundaries.</exception> - - - - - Gets a line of an input by index - - - - - Gets the count of lines in the input - - - - - Gets the last character position in the input, returning line and column - - - - - Copies a section of the input to the given destination ad the given index - - - - - Checks if one input is equal to another - - - - - Represents an input to the F# compiler - - - - - 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 Layout module. any_to_string and output_any are - built using any_to_layout with default format options. - - - - - For limiting 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. - - - - - See tagL - - - - - Layout like an F# list. - - - - - Layout like an F# option. - - - - - Layout list vertically. - - - - - Layout two vertically. - - - - - Form tuple of layouts. - - - - - Wrap braces around layout. - - - - - Wrap square brackets around layout. - - - - - Wrap round brackets around Layout. - - - - - Join layouts into a list separated using the given Layout. - - - - - Join layouts into a semi-colon separated list. - - - - - Join layouts into a space separated list. - - - - - Join layouts into a comma separated list. - - - - - Join broken with ident=4 - - - - - Join broken with ident=3 - - - - - Join broken with ident=2 - - - - - Join broken with ident=1 - - - - - Join broken with ident=0 - - - - - optional break, indent=4 - - - - - optional break, indent=3 - - - - - Join, possible break with indent=2 - - - - - Join, possible break with indent=1 - - - - - Join, possible break with indent=0 - - - - - Join, unbreakable. - - - - - An string which is left parenthesis (no space on the right). - - - - - An string which is right parenthesis (no space on the left). - - - - - An string which requires no spaces either side. - - - - - An string leaf - - - - - 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. - - - - - Check if the last character in the layout is the given character - - - - - Is it the empty layout? - - - - - The empty layout - - - - - 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. - - - - - Convert a line number from one-based line counting (used internally in the F# compiler and in F# error messages) to zero-based line counting (used by Visual Studio) - - - - - Convert a line number from zero-based line counting (used by Visual Studio) to one-based line counting (used internally in the F# compiler and in F# error messages) - - - - - Functions related to converting between lines indexed at 0 and 1 - - - - - Equality comparer for range. - - - - - Convert a range from one-based line counting (used internally in the F# compiler and in F# error messages) to zero-based line counting (used by Visual Studio) - - - - - Convert a range from one-based line counting (used internally in the F# compiler and in F# error messages) to zero-based line counting (used by Visual Studio) - - - - - Convert a range to a string - - - - - A range associated with a dummy file for the command line arguments - - - - - A range associated with a dummy file called "startup" - - - - - The zero range - - - - - Make a dummy range for a file - - - - - Test to see if a range occurs fully before a position - - - - - Test to see if a range contains a position - - - - - Test to see if one range contains another range - - - - - Union two ranges, taking their first occurring start position and last occurring end position - - - - - Output a range - - - - - Order ranges (file, then start pos, then end pos) - - - - - Reduce a range so it only covers a line - - - - - Make a range for the first non-whitespace line of the file if any. Otherwise use line 1 chars 0-80. - This involves reading the file. - - - - - This view hides the use of file indexes and just uses filenames - - - - - This view of range marks uses file indexes explicitly - - - - - Ordering on positions - - - - - Convert an index into a file path - - - - - Convert a file path to an index - - - - - The zero position - - - - - Convert a position to a string - - - - - Output a position - - - - - Convert a position from one-based line counting (used internally in the F# compiler and in F# error messages) to zero-based line counting (used by Visual Studio) - - - - - Convert a position from zero-based line counting (used by Visual Studio) to one-based line counting (used internally in the F# compiler and in F# error messages) - - - - - Compare positions for greater-than-or-equal-to - - - - - Compare positions for equality - - - - - Compare positions for greater-than - - - - - Compare positions for less-than - - - - - Create a position for the given line and column - - - - - Render layout to collector of TaggedText - - - - - Render layout to StringBuilder - - - - - Render layout to channel - - - - - Render layout to string - - - - - Run a render on a Layout - - - - - Creates an ISourceText object from the given string - - - - - Functions related to ISourceText objects - - - - - Return 'true' if the computation is in-progress. - - - - - Return 'true' if the computation has already been computed. - - - - - Return 'Some' if the computation has already been computed, else None if - the computation is in-progress or has not yet been started. - - - - - Return NodeCode which, when executed, will get the value of the computation if already computed, or - await an existing in-progress computation for the node if one exists, or else will synchronously - start the computation on the current thread. - - - - - Creates a GraphNode with given result already cached. - - - - - - computation - The computation code to run. - - - - - Evaluate the computation, allowing asynchronous waits on existing ongoing evaluations of the - same node, and strongly cache the result. - - Once the result has been cached, the computation function will also be removed, or 'null'ed out, - as to prevent any references captured by the computation from being strongly held. - - - - - Only used for testing, do not use - - - - - Used in places where we don't care about cancellation, e.g. the command line compiler - and F# Interactive - - - - - Only used for testing, do not use - - - - - Execute the cancellable computation synchronously using the ambient cancellation token of - the NodeCode. - - - - - Only used for testing, do not use - - - - - Contains helpers to specify code that can be run as part of the build graph. - - - - - A generic 'use' that disposes of the IDisposable at the end of the computation. - - - - - A limited form 'use' for establishing the compilation globals. - - - - - A standard builder for node code. - - - - - Represents code that can be run as part of the build graph. - - This is essentially cancellable async code where the only asynchronous waits are on nodes. - When a node is evaluated the evaluation is run synchronously on the thread of the - first requestor. - - - - - Specifies code that can be run as part of the build graph. - - - - - Asynchronously await code in the build graph - - - - - Allows to specify the language for error messages - - - - - Contains helpers related to the build graph - - - - - Will not dispose of the stream reader. - - - - - Try to get the XmlDocumentationInfo for a file - - - - - Represents a capability to access XmlDoc files - - - - - Look up an item in the XmlDoc file - - - - - Create an XmlDocumentationInfo from a file - - - - - Represents access to an XmlDoc file - - - - - Get the overall range of the PreXmlDoc - - - - - Indicates if the PreXmlDoc is non-empty - - - - - Get the empty PreXmlDoc - - - - - Process and check the PreXmlDoc, checking with respect to the given parameter names - - - - - Merge two PreXmlDoc - - - - - Mark the PreXmlDoc as invalid - - - - - Create a PreXmlDoc from a collection of unprocessed lines - - - - - Represents the XmlDoc fragments as collected from the lexer during parsing - - - - - Get the documentation lines before the given point - - - - - Indicates it the given point has XmlDoc comments - - - - - Check if XmlDoc comments are at invalid positions, and if so report them - - - - - Add a line of XmlDoc text - - - - - Indicate the next XmlDoc will act as a point where prior XmlDoc are collected - - - - - Add a point where prior XmlDoc are collected - - - - - Create a fresh XmlDocCollector - - - - - Used to collect XML documentation during lexing and parsing. - - - - - Get the lines before insertion of implicit summary tags and encoding - - - - - Indicates the overall original source range of the XmlDoc - - - - - Indicates if the XmlDoc is non-empty - - - - - Indicates if the XmlDoc is empty - - - - - Get the empty XmlDoc - - - - - Merge two XML documentation - - - - - Get the elaborated XML documentation as XML text - - - - - Get the lines after insertion of implicit summary tags and encoding - - - - - Check the XML documentation - - - - - Represents collected XmlDoc lines - - - - - Represents additional information for SynConst.Measure - - - - - The syntax ranges of the `&` tokens - - - - - Represents additional information for SynTyparDecl - - - - - The syntax range of 'get, set' - - - - - Represents additional information for SynMemberSig.Member - - - - - The syntax range of the `:` token - - - - - Represents additional information for SynBindingReturnInfo - - - - - The syntax range of the `or` keyword - - - - - Represents additional information for SynType.Or - - - - - Used leading keyword of SynField - - - - - Represents additional information for SynField - - - - - The syntax range of 'get, set' - - - - - Represents additional information for SynMemberDefn.AbstractSlot - - - - - The syntax range of 'get, set' - - - - - The syntax range of the `=` token - - - - - The syntax range of the `with` keyword - - - - - Used leading keyword of AutoProperty - - - - - Represents additional information for SynMemberDefn.AutoProperty - - - - - Represents additional information for `get, set` syntax - - - - - The syntax range from the beginning of the `(` token till the end of the `)` token. - - - - - Represents additional information for SynArgPats.NamePatPairs - - - - - The syntax range of the `as` keyword - - - - - Represents additional information for SynMemberDefn.ImplicitCtor - - - - - The syntax range of the `set` keyword - - - - - The syntax range of the `and` keyword - - - - - The syntax range of the `get` keyword - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `inline` keyword - - - - - Represents additional information for SynMemberDefn.GetSetMember - - - - - The syntax range of the `->` token. - - - - - Represents additional information for SynType.Fun - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `inline` keyword - - - - - Used leading keyword of SynValSig - In most cases this will be `val`, - but in case of `SynMemberDefn.AutoProperty` or `SynMemberDefn.AbstractSlot` it could be something else. - - - - - Represents additional information for SynValSig - - - - - The syntax range of the `module` or `namespace` keyword - - - - - Represents additional information for SynModuleOrNamespaceSig - - - - - The syntax range of the `module` or `namespace` keyword - - - - - Represents additional information for SynModuleOrNamespace - - - - - Represents the leading keyword in a SynModuleOrNamespace or SynModuleOrNamespaceSig - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `module` keyword - - - - - Represents additional information for SynModuleSigDecl.NestedModule - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `module` keyword - - - - - Represents additional information for SynModuleDecl.NestedModule - - - - - The syntax range of the `in` keyword. - - - - - The syntax range of the `=` token. - - - - - Represents additional information for SynExprAndBang - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `inline` keyword - - - - - Used leading keyword of SynBinding - - - - - Represents additional information for SynBinding - - - - - Represents the leading keyword in a SynBinding or SynValSig - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `type` or `and` keyword. - - - - - Represents additional information for SynTypeDefnSig - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `type` or `and` keyword. - - - - - Represents additional information for SynTypeDefn - - - - - Produced during type checking, should not be used in actual parsed trees. - - - - - Can happen in SynMemberDefn.NestedType or SynMemberSig.NestedType - - - - - Represents the leading keyword in a SynTypeDefn or SynTypeDefnSig - - - - - The syntax range of the `::` token. - - - - - Represents additional information for SynPat.Cons - - - - - The syntax range of the `|` token. - - - - - Represents additional information for SynPat.Or - - - - - The syntax range of the `|` token. - - - - - Represents additional information for SynUnionCase - - - - - The syntax range of the `=` token. - - - - - The syntax range of the `|` token. - - - - - Represents additional information for - - - - - The syntax range of the `|` token. - - - - - The syntax range of the `->` token. - - - - - Represents additional information for SynMatchClause - - - - - The syntax range of the `{|` token. - - - - - Represents additional information for SynExpr.AnonRecd - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `match!` keyword - - - - - Represents additional information for SynExpr.MatchBang - - - - - The syntax range of the `with` keyword - - - - - The syntax range of the `match` keyword - - - - - Represents additional information for SynExpr.Match - - - - - The syntax range of the `=` token. - - - - - Represents additional information for SynExpr.LetOrUseBang - - - - - The syntax range of the `in` keyword. - - - - - Represents additional information for SynExpr.LetOrUse - - - - - Represents additional information for SynExpr.DotLambda - - - - - The syntax range of the `->` token. - - - - - Represents additional information for SynExpr.Lambda - - - - - The syntax range from the beginning of the `if` keyword till the end of the `then` keyword. - - - - - The syntax range of the `else` keyword. - - - - - The syntax range of the `then` keyword. - - - - - Indicates if the `elif` keyword was used - - - - - The syntax range of the `if` keyword. - - - - - Represents additional information for SynExpr.IfThenElse - - - - - The syntax range of the `finally` keyword - - - - - The syntax range of the `try` keyword. - - - - - Represents additional information for SynExpr.TryFinally - - - - - The syntax range from the beginning of the `with` keyword till the end of the TryWith expression. - - - - - The syntax range of the `with` keyword - - - - - The syntax range from the beginning of the `try` keyword till the end of the `with` keyword. - - - - - The syntax range of the `try` keyword. - - - - - Represents additional information for SynExpr.TryWith - - - - - Represent code comments found in the source file - - - - - Preprocessor directives of type #if, #else or #endif - - - - - Represents additional information for ParsedSigFileInputTrivia - - - - - Represent code comments found in the source file - - - - - Preprocessor directives of type #if, #else or #endif - - - - - Represents additional information for ParsedImplFileInput - - - - - The ident had parenthesis - Example: let (|Odd|Even|) = ... - The active pattern ident will be "|Odd|Even|", while originally there were parenthesis. - - - - - The ident originally had a different notation and parenthesis - Example: let (>=>) a b = ... - The operator ident will be compiled into "op_GreaterEqualsGreater", while the original notation was ">=>" and had parenthesis - - - - - The ident originally had a different notation. - Example: a + b - The operator ident will be compiled into "op_Addition", while the original notation was "+" - - - - - 'e1 |||> e2' - - - - - 'e1 ||> e2' - - - - - 'e1 |> e2' - - - - - 'e1 || e2' - - - - - 'e1 && e2' - - - - - "fun (UnionCase x) (UnionCase y) -> body" - ==> - "fun tmp1 tmp2 -> - let (UnionCase x) = tmp1 in - let (UnionCase y) = tmp2 in - body" - - - - - 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 - - - - - Recognize the '()' in 'new()' - - - - - This affects placement of debug points - - - - - Match a long identifier, including the case for single identifiers which gets a more optimized node in the syntax tree. - - - - - Infer the syntactic information for a 'let' or 'member' definition, based on the argument pattern, - any declared return information (e.g. .NET attributes on the return element), and the r.h.s. expression - in the case of 'let' definitions. - - - - - Transform a property declared using '[static] member P = expr' to a method taking a "unit" argument. - This is similar to IncorporateEmptyTupledArgForPropertyGetter, but applies to member definitions - rather than member signatures. - - - - - Make sure only a solitary unit argument has unit elimination - - - - - Infer the syntactic argument info for one or more arguments a pattern. - - - - - Infer the syntactic argument info for one or more arguments one or more simple patterns. - - - - - Infer the syntactic argument info for a single argument from a simple pattern. - - - - - Get the argument attributes from the syntactic information for an argument. - - - - - Get the argument counts for each curried argument group. Used in some adhoc places in tc.fs. - - - - - Add a parameter entry to the syntactic value information to represent the value argument for a property setter. This is - used for the implicit value argument in property setter signature specifications. - - - - - Add a parameter entry to the syntactic value information to represent the 'this' argument. This is - used for the implicit 'this' argument in member signature specifications. - - - - - Add a parameter entry to the syntactic value information to represent the '()' argument to a property getter. This is - used for the implicit '()' argument in property getter signature specifications. - - - - - Check if there are any optional arguments in the syntactic argument information. Used when adjusting the - types of optional arguments for function and member signatures. - - - - - Check if one particular argument is an optional argument. Used when adjusting the - types of optional arguments for function and member signatures. - - - - - Determine if a syntactic information represents a member without arguments (which is implicitly a property getter) - - - - - The 'argument' information for the 'this'/'self' parameter in the cases where it is not given explicitly - - - - - The 'argument' information for a return value where no attributes are given for the return value (the normal case) - - - - - The argument information for a '()' argument - - - - - The argument information for a curried argument without a name - - - - - The argument information for an argument without a name - - - - - Operations related to the syntactic analysis of arguments of value, function and member definitions and signatures. - - - - - Incorporate a '^' for an qualified access to a generic type parameter - - - - - The error raised by the parse_error_rich function, which is called by the parser engine - when a syntax error occurs. The first object is the ParseErrorContext which contains a dump of - information about the grammar at the point where the error occurred, e.g. what tokens - are valid to shift next at that point in the grammar. This information is processed in CompileOps.fs. - - - - - This function gets the name of a token as a string - - - - - This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production - - - - - This function maps integer indexes to symbolic token ids - - - - - This function maps tokens to integer indexes - - - - - This function gets the name of a token as a string - - - - - This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production - - - - - This function maps integer indexes to symbolic token ids - - - - - This function maps tokens to integer indexes - - - - - Used in lex.fsl to represent the state of a block comment - - - - - Used in lex.fsl to represent the state of a single line comment - - - - - Used in lex.fsl to represent the state of a string literal - - - - - The context applicable to all lexing functions (tokens, strings etc.) - - - - - Lexer args: status of #light processing. Mutated when a #light - directive is processed. This alters the behaviour of the lexfilter. - - - - - Arbitrary value - - - - - Rule rest - - - - - Rule tokenstream - - - - - Rule mlOnly - - - - - Rule tripleQuoteStringInComment - - - - - Rule verbatimStringInComment - - - - - Rule stringInComment - - - - - Rule comment - - - - - Rule singleLineComment - - - - - Rule extendedInterpolatedString - - - - - Rule tripleQuoteString - - - - - Rule verbatimString - - - - - Rule singleQuoteString - - - - - Rule endline - - - - - Rule ifdefSkip - - - - - Rule token - - - - - The LexBuffer associated with the filter - - - - - Get the next token - - - - - Create a lex filter - - - - - A stateful filter over the token stream that adjusts it for indentation-aware syntax rules - Process the token stream prior to parsing. Implements the offside rule and other lexical transformations. - - - - - Match the close of '>' of a set of type parameters. - This is done for tokens such as '>>' by smashing the token - - - - - LexFilter - process the token stream prior to parsing. - Implements the offside rule and a couple of other lexical transformations. - - - - - Compute the hash value for the tainted value - - - - - Test whether the tainted value equals given value. Type providers are ignored (equal tainted values produced by different type providers are equal) - Failure in call to equality operation will be blamed on type provider of first operand - - - - - Test whether the tainted value equals given value. - Failure in call to equality operation will be blamed on type provider of first operand - - - - - Test whether the tainted value is null - - - - - The table of remappings from type names in the provided assembly to type - names in the statically linked, embedded assembly. - - - - - Create a new static linking map, ready to populate with data. - - - - - The table of information recording remappings from type names in the provided assembly to type - names in the statically linked, embedded assembly, plus what types are nested in side what types. - - - - - Represents the remapping information for a generated provided type and its nested types. - - There is one overall tree for each root 'type X = ... type generation expr...' specification. - - - - - Convert the expression to a string for diagnostics - - - - - Map the TyconRef objects, if any - - - - - The context used to interpret information in the closure of System.Type, System.MethodInfo and other - info objects coming from the type provider. - - At the moment this is the "Type --> ILTypeRef" and "Type --> Tycon" remapping - context for generated types (it is empty for erased types). This is computed from - while processing the [<Generate>] declaration related to the type. - - Immutable (after type generation for a [<Generate>] declaration populates the dictionaries). - - The 'obj' values are all TyconRef, but obj is used due to a forward reference being required. Not particularly - pleasant, but better than intertwining the whole "ProvidedType" with the TAST structure. - - - - - The folder for temporary files - - - - - All referenced assemblies, including the type provider itself, and possibly other type providers. - - - - - Whether or not the --showextensionresolution flag was supplied to the compiler. - - - - - Output file name - - - - - The folder from which an extension provider is resolving from. This is typically the project folder. - - - - - Carries information about the type provider resolution environment. - - - - - Check if this is a direct reference to a non-embedded generated type. This is not permitted at any name resolution. - We check by seeing if the type is absent from the remapping context. - - - - - Get the ILTypeRef for the provided type (including for nested types). Do not take into account - any type relocations or static linking for generated types. - - - - - Get the ILTypeRef for the provided type (including for nested types). Take into account - any type relocations or static linking for generated types. - - - - - Decompose the enclosing name of a type (including any class nestings) into a list of parts. - e.g. System.Object -> ["System"; "Object"] - - - - - Get the parts of a .NET namespace. Special rules: null means global, empty is not allowed. - - - - - Try to resolve a type in the given extension type resolver - - - - - Try to resolve a type in the given extension type resolver - - - - - Try to apply a provided method to the given static arguments. - - - - - Try to apply a provided type to the given static arguments. If successful also return a function - to check the type name is as expected (this function is called by the caller of TryApplyProvidedType - after other checks are made). - - - - - Validate that the given provided type meets some of the rules for F# provided types - - - - - Get the provided expression for a particular use of a method. - - - - - Given an extension type resolver, supply a human-readable name suitable for error messages. - - - - - Find and instantiate the set of ITypeProvider components for the given assembly reference - - - - - Get the list of relative paths searched for type provider design-time components - - - - - Raised when an type provider has thrown an exception. - - - - - Raised when a type provider has thrown an exception. - - - - - Indicates an F# 3.0+ reference to a named type in an assembly loaded by name - - - - - Indicates an F# 4.0+ reference into the supplied table of type definition references, ultimately resolved by TypeRef/TypeDef data - - - - - Code to pickle out quotations in the quotation binary format. - - - - - A global generator of stable compiler generated names - - - - - A global generator of compiler generated names - - - - - A name generator used by IlxGen for static fields, some generated arguments and other things. - - - - - Generates compiler-generated names marked up with a source code location, but if given the same unique value then - return precisely the same name. Each name generated also includes the StartLine number of the range passed in - at the point of first generation. - - This type may be accessed concurrently, though in practice it is only used from the compilation thread. - It is made concurrency-safe since a global instance of the type is allocated in tast.fs. - - - - - Generates compiler-generated names. Each name generated also includes the StartLine number of the range passed in - at the point of first generation. - - This type may be accessed concurrently, though in practice it is only used from the compilation thread. - It is made concurrency-safe since a global instance of the type is allocated in tast.fs, and it is good - policy to make all globally-allocated objects concurrency safe in case future versions of the compiler - are used to host multiple concurrent instances of compilation. - - - - - Unique name generator for stamps attached to to val_specs, tycon_specs etc. - Concurrency-safe - - - - - Concurrency-safe - - - - - Defines the global environment for all type checking. - - - - - Create a new Val node - - - - - Create a new union case node - - - - - Create a new type parameter node - - - - - Create a new type definition node - - - - - Create a new type parameter node for a declared type parameter - - - - - Create a new TAST RecdField node for an F# class, struct or record field - - - - - Create a new node for the representation information for a provided type definition - - - - - Create a new entity node for a provided type definition - - - - - Create a new node for the contents of a module or namespace - - - - - Create a new entity node for a module or namespace - - - - - Create a Val based on an existing one using the function 'f'. - We require that we be given the parent for the new Val. - - - - - 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 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 new type definition node for a .NET type definition - - - - - Create a new unfilled cache for free variable calculations - - - - - Create a new TAST Entity node for an F# exception definition - - - - - Create a new node for an empty module or namespace contents - - - - - Create a new node for an empty F# tycon data - - - - - Create a new type definition node by cloning an existing one - - - - - Create a new module or namespace node by cloning an existing one - - - - - Create the new contents of an overall assembly - - - - - Create a node for a union type - - - - - Create the union case tables for a union type - - - - - Create the field tables for a record or class type - - - - - Key a Tycon or TyconRef by decoded name - - - - - Key a Tycon or TyconRef by both mangled type demangled name. - Generic types can be accessed either by 'List' or 'List`1'. - This lists both keys. - - - - - Compute the definition location of a provided item - - - - - A set of static methods for constructing types. - - - - - See FreeTyvars above. - - - - - The summary of union constructors used in the expression. These may be - marked 'internal' or 'private' type we have to check various conditions associated with that. - - - - - The summary of fields used in the expression. These may be made private by a signature - or marked 'internal' or 'private' type we have to check various conditions associated with that. - - - - - The summary of locally defined tycon representations used in the expression. These may be made private by a signature - or marked 'internal' or 'private' type we have to check various conditions associated with that. - - - - - 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. - - - - - Indicates if the expression contains a call to a protected member or a base call. - Calls to protected members type direct calls to super classes can't escape, also code can't be inlined - - - - - 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', type we have to check various conditions associated with that. - - - - - Represents the set of free variables in an expression - - - - - Represents an amortized computation of the free variables in an expression - - - - - The summary of type parameters used in the expression. These may not escape the enclosing generic construct - type we have to check various conditions associated with that. - - - - - The summary of values used as trait solutions - - - - - The summary of locally defined type definitions used in the expression. These may be made private by a signature - type we have to check various conditions associated with that. - - - - - Represents a set of 'free' type-related elements, including named types, trait solutions, union cases and - record fields. - - - - - Represents a set of 'free' union cases. Used to collect the union cases referred to from an expression. - - - - - Represents a set of 'free' record field definitions. Used to collect the record field definitions referred to - from an expression. - - - - - Represents a set of 'free' named type definitions. Used to collect the named type definitions referred to - from a type or expression. Computed type cached by later phases (never cached type checking). Cached - in expressions. Not pickled. - - - - - Represents a set of free type parameters. Computed type cached by later phases - (never cached type checking). Cached in expressions. Not pickled. - - - - - Represents a set of free local values. Computed type cached by later phases - (never cached type checking). Cached in expressions. Not pickled. - - - - - Represents the information saved in the assembly signature data resource for an F# assembly - - - - - 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. - - - - - ccu.target is null when a reference is missing in the transitive closure of static references that - may potentially be required for the metadata of referenced DLLs. - - - - - Indicates that this DLL uses F# 2.0+ quotation literals somewhere. This is used to implement a restriction on static linking. - - - - - Indicates that this DLL uses F# 2.0+ quotation literals somewhere. This is used to implement a restriction on static linking. - - - - - The table of type forwarders for this assembly - - - - - A unique stamp for 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?) - - - - - The table of type definitions at the "root" of the assembly - - - - - The table of modules type namespaces at the "root" of the assembly - - - - - The fully qualified assembly reference string to refer to this assembly. This is persisted in quotations - - - - - Indicates if this assembly reference is unresolved - - - - - Is this a provider-injected assembly - - - - - Indicates that this DLL was compiled using the F# compiler type has F# metadata - - - - - Holds the data indicating how this assembly/module is referenced from the code being compiled. - - - - - Holds the file name for the assembly, if any - - - - - Dereference the assembly reference - - - - - A handle to the full specification of the contents of the module contained in this ccu - - - - - The short name of the assembly being referenced - - - - - Try to get the .NET Assembly, if known. May not be present for `IsFSharp` for - in-memory cross-project references - - - - - Try to resolve a path into the CCU by referencing the .NET/CLI type forwarder table of the CCU - - - - - Used to make forward calls into the type/assembly loader when comparing member signatures during linking - - - - - Used to make 'forward' calls into the loader during linking - - - - - Fixup a CCU to have the given contents - - - - - Ensure the ccu is derefable in advance. Supply a path to attach to any resulting error message. - - - - - Create a CCU with the given name but where the contents have not yet been specified - - - - - Create a CCU with the given name type contents - - - - - Used at the end of comppiling an assembly to get a frozen, final stable CCU - for the compilation which we no longer mutate. - - - - - A relinkable handle to the contents of a compilation unit. Relinking is performed by mutation. - - - - - Represents a table of .NET CLI type forwarders for an assembly - - - - - The table of .NET CLI type forwarders for this assembly - - - - - A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality - logic in tastops.fs - - - - - A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality - logic in tastops.fs - - - - - A handle to the full specification of the contents of the module contained in this ccu - - - - - Indicates that this DLL uses pre-F#-4.0 quotation literals somewhere. This is used to implement a restriction on static linking - - - - - A helper function used to link method signatures using type equality. This is effectively a forward call to the type equality - logic in tastops.fs - - - - - Triggered when the contents of the CCU are invalidated - - - - - Is the CCu an assembly injected by a type provider - - - - - Indicates that this DLL was compiled using the F# compiler type has F# metadata - - - - - 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?) - - - - - The fully qualified assembly reference string to refer to this assembly. This is persisted in quotations - - - - - A unique stamp for this DLL - - - - - Holds the data indicating how this assembly/module is referenced from the code being compiled. - - - - - Holds the file name for the DLL, if any - - - - - Represents a complete typechecked assembly, made up of multiple implementation files. - - - - - Represents checked file, after optimization, equipped with the ability to do further optimization of expressions. - - - - - Represents a complete typechecked implementation file, including its inferred or explicit signature. - - CheckedImplFile (qualifiedNameOfFile, pragmas, signature, contents, hasExplicitEntryPoint, isScript, anonRecdTypeInfo) - - - - - The moduleOrNamespace represents the signature of the module. - The moduleOrNamespaceContents contains the definitions of the module. - The same set of entities are bound in the ModuleOrNamespace as in the ModuleOrNamespaceContents. - - - - - A named module-or-namespace-fragment definition - - - - - Indicates the module fragment is a 'rec' or 'non-rec' definition of types type modules - - - - - Indicates the module fragment is an evaluation of expression for side-effects - - - - - Indicates the module fragment is a 'let' definition - - - - - Indicates the given 'open' declarations are active - - - - - Indicates the module fragment is made of several module fragments in succession - - - - - The contents of a module-or-namespace-fragment definition - - - - - If it's `namespace Xxx.Yyy` declaration. - - - - - Scope in which open declaration is visible. - - - - - Types whose static content is opened with this declaration. - - - - - Modules or namespaces which is opened with this declaration. - - - - - Full range of the open declaration. - - - - - Syntax after 'open' as it's presented in source code. - - - - - Create a new instance of OpenDeclaration. - - - - - Represents open declaration statement. - - - - - Represents a parameter to an abstract method slot. - - TSlotParam(nm, ty, inFlag, outFlag, optionalFlag, attribs) - - - - - The name of the method - - - - - The method type parameters of the slot - - - - - The formal return type of the slot (regardless of the type or method instantiation) - - - - - The formal parameters of the slot (regardless of the type or method instantiation) - - - - - The (instantiated) type which the slot is logically a part of - - - - - The class type parameters of the slot - - - - - Represents an abstract method slot, or delegate signature. - - TSlotSig(methodName, declaringType, declaringTypeParameters, methodTypeParameters, slotParameters, returnTy) - - - - - A representation of a method in an object expression. - - TObjExprMethod(slotsig, attribs, methTyparsOfOverridingMethod, methodParams, methodBodyExpr, m) - - - - - Indicates the static optimization applies when a type is a struct - - - - - Indicates the static optimization applies when a type equality holds - - - - - Represents the kind of an F# core library static optimization construct - - - - - A call to a base method, e.g. 'base.OnPaint(args)' - - - - - A call to a constructor, e.g. 'new C() = new C(3)' - - - - - A call to a constructor, e.g. 'inherit C()' - - - - - A normal use of a value - - - - - Indicates a use of a value represents a call to a method that may require - a .NET 2.0 constrained call. A constrained call is only used for calls where - - - - - Indicates how a value, function or member is being used at a particular usage point. - - - - - let res = a in b;res - - - - - a ; b - - - - - Represents the kind of sequential operation, i.e. "normal" or "to a before returning b" - - - - - In C syntax this is: *localv_ptr = e - - - - - In C syntax this is: localv = e, note == *(&localv) = e == LAddrOf; LByrefSet - - - - - In C syntax this is: *localv_ptr - - - - - In C syntax this is: &localv - - - - - Indicates what kind of pointer operation this is. - - - - - Evaluate start once type end multiple times, loop up - - - - - Evaluate start type end once, loop down - - - - - Evaluate start type end once, loop up - - - - - Represents the kind of looping operation. - - - - - Marks the compiled form of a 'for ... in ... do ' expression - - - - - Represents the kind of looping operation. - - - - - If this is Some ty then it indicates that a .NET 2.0 constrained call is required, with the given type as the - static type of the object argument. - - - - - Normal record construction - - - - - We're in an explicit constructor. The purpose of the record expression is to - fill in the fields of a pre-created but uninitialized object - - - - - Represents the kind of record construction operation. - - - - - IL method calls. - isProperty -- used for quotation reflection, property getters & setters - noTailCall - DllImport? if so don't tailcall - retTypes -- the types of pushed values, if any - - - - - Operation nodes representing C-style operations on byrefs type mutable vals (l-values) - - - - - Pseudo method calls. This is used for overloaded operations like op_Addition. - - - - - Used for state machine compilation - - - - - Used for state machine compilation - - - - - Used for state machine compilation - - - - - Represents a "rethrow" operation. May not be rebound, or used outside of try-finally, expecting a unit argument - - - - - Conversion node, compiled via type-directed translation or to box/unbox - - - - - Generate a ldflda on an 'a ref. - - - - - IL assembly code - type list are the types pushed on the stack - - - - - An operation representing a field-get from an F# tuple value. - - - - - An operation representing a field-set on an F# exception value. - - - - - An operation representing a field-get from an F# exception value. - - - - - 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. - - - - - An operation representing a field-get from a union value, where that value has been proven to be of the corresponding union case. - - - - - An operation representing a field-get from a union value, where that value has been proven to be of the corresponding union case. - - - - - 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 - - - - - An operation representing getting an integer tag for a union value representing the union case number - - - - - An operation representing getting the address of a record field - - - - - An operation representing getting a record or class field - - - - - An operation representing setting a record or class field - - - - - Construct a record or object-model value. The ValRef is for self-referential class constructors, otherwise - it indicates that we're in a constructor type the purpose of the expression is to - fill in the fields of a pre-created but uninitialized object, type to assign the initialized - version of the object into the optional mutable cell pointed to be the given value. - - - - - An operation representing a lambda-encoded try/finally - - - - - An operation representing a lambda-encoded try/with - - - - - An operation representing a lambda-encoded integer for-loop - - - - - An operation representing a lambda-encoded while loop. The special while loop marker is used to mark compilations of 'foreach' expressions - - - - - Constant uint16 arrays (used for parser tables) - - - - - Constant byte arrays (used for parser tables type other embedded data) - - - - - An operation representing the creation of an array value - - - - - An operation representing the get of a property from an anonymous record - - - - - An operation representing the creation of an anonymous record - - - - - An operation representing the creation of a tuple value - - - - - An operation representing the creation of an exception value using an F# exception declaration - - - - - An operation representing the creation of a union value of the particular union case - - - - - Indicates a debug point should be placed prior to the expression. - - - - - An instance of a link node occurs for every use of a recursively bound variable. When 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. - - - - - 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. - - - - - Used in quotation generation to indicate a witness argument, spliced into a quotation literal. - - For example: - - let inline f x = <@ sin x @> - - needs to pass a witness argument to `sin x`, captured from the surrounding context, for the witness-passing - version of the code. Thus the QuotationTranslation type IlxGen makes the generated code as follows: - - f(x) { return Deserialize(<@ sin _spliceHole @>, [| x |]) } - - f$W(witnessForSin, x) { return Deserialize(<@ sin$W _spliceHole1 _spliceHole2 @>, [| WitnessArg(witnessForSin), x |]) } - - where _spliceHole1 will be the location of the witness argument in the quotation data, type - witnessArg is the lambda for the witness - - - - - - Indicates the expression is a quoted expression tree. - - - - - - An intrinsic applied to some (strictly evaluated) arguments - A few of intrinsics (TOp_try, TOp.While, TOp.IntegerForLoop) expect arguments kept in a normal form involving lambdas - - - - - If we statically know some information 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. - - - - - Matches are a more complicated form of "let" with multiple possible destinations - type possibly multiple ways to get to each destination. - The first range is that of the expression being matched, which is used - as the range for all the decision making type binding that happens during the decision tree - execution. - - - - - Bind a value. - - - - - Bind a recursive set of values. - - - - - Applications. - Applications combine type type term applications, type 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. - - - - - Type lambdas. These are used for the r.h.s. of polymorphic 'let' bindings type - for expressions that implement first-class polymorphic values. - - - - - Lambda expressions. - Why multiple vspecs? A Expr.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. - - - - - Sequence expressions, used for "a;b", "let a = e in b;a" type "a then b" (the last an OO constructor). - - - - - Reference a value. The flag is only relevant if the value is an object model member - type indicates base calls type special uses of object constructors. - - - - - A constant expression. - - - - - Get the mark/range/position information from an expression - - - - - Represents an expression in the typed abstract syntax - - - - - Records the extra metadata stored about typars for type parameters - compiled as "real" IL type parameters, specifically for values with - ValReprInfo. Any information here is propagated from signature through - to the compiled code. - - - - - The range of the signature/implementation counterpart to this argument, if any - - - - - The name for the argument at this position, if any - - - - - The attributes for the argument - - - - - Records the "extra information" for an argument compiled as a real - method argument, specifically the argument name type attributes. - - - - - ValReprInfo (typars, args, result) - - - - - Get the total number of arguments - - - - - Get the number of type parameters of the value - - - - - Get the number of curried arguments of the value - - - - - Get the kind of each type parameter - - - - - Indicates if the value has no arguments - neither type parameters nor value arguments - - - - - Get the number of tupled arguments in each curried argument position - - - - - Get the extra information about the arguments for the value - - - - - Records the "extra information" for a value compiled as a method (rather - than a closure or a local), including argument names, attributes etc. - - - - - Get a reference to the value for the active pattern being referred to - - - - - Get the index of the active pattern element within the overall active pattern - - - - - Get a reference to the value for the active pattern being referred to - - - - - Get the full information about the active pattern being referred to - - - - - Represents a reference to an active pattern element. The - integer indicates which choice in the target set is being selected by this item. - - - - - The value being bound - - - - - The expression the value is being bound to - - - - - The information about whether to emit a sequence point for the binding - - - - - A binding of a variable to an expression, as in a `let` binding or similar - -- val: The value being bound - -- expr: The expression to execute to get the value - -- debugPoint: The debug point for the binding - - - - - A collection of simultaneous bindings - - - - - A target of a decision tree. Can be thought of as a little function, though is compiled as a local block. - -- boundVals - The values bound at the target, matching the valuesin the TDSuccess - -- targetExpr - The expression to evaluate if we branch to the target - -- debugPoint - The debug point for the target - -- isStateVarFlags - Indicates which, if any, of the values are repesents as state machine variables - - - - - Used in error recovery - - - - - Test.ActivePatternCase(activePatExpr, activePatResTys, isStructRetTy, activePatIdentity, idx, activePatInfo) - - Run the active pattern type bind a successful result to a - variable in the remaining tree. - activePatExpr -- The active pattern function being called, perhaps applied to some active pattern parameters. - activePatResTys -- The result types (case types) of the active pattern. - isStructRetTy -- Is the active pattern a struct return - activePatIdentity -- The value type the types it is applied to. If there are any active pattern parameters then this is empty. - idx -- The case number of the active pattern which the test relates to. - activePatternInfo -- The extracted info for the active pattern. - - - - - IsInst(source, target) - - Test if the input to a decision tree is an instance of the given type - - - - - Test if the input to a decision tree is null - - - - - Test if the input to a decision tree is the given constant value - - - - - Test if the input to a decision tree is an array of the given length - - - - - Test if the input to a decision tree matches the given union case - - - - - Get the discriminator associated with the case - - - - - Get the decision tree or a successful test - - - - - Represents a test type a subsequent decision tree - - - - - TDBind(binding, body) - - Bind the given value through the remaining cases of the dtree. - These arise from active patterns type some optimizations to prevent - repeated computations in decision trees. - binding -- the value type the expression it is bound to - body -- the rest of the decision tree - - - - - TDSuccess(results, targets) - - Indicates the decision tree has terminated with success, transferring control to the given target with the given parameters. - results -- the expressions to be bound to the variables at the target - target -- the target number for the continuation - - - - - TDSwitch(input, cases, default, range) - - Indicates a decision point in a decision tree. - input -- The expression being tested. If switching over a struct union this - must be the address of the expression being tested. - cases -- The list of tests type their subsequent decision trees - default -- The default decision tree, if any - range -- (precise documentation needed) - - - - - Decision trees. Pattern matching has been compiled down to - a decision tree by this point. The right-hand-sides (actions) of - 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. - - - - - Constants in expressions - - - - - AttribNamedArg(name, type, isField, value) - - - - - AttribExpr(source, evaluated) - - - - - We keep both source expression type evaluated expression around to help intellisense type signature printing - - - - - Attrib(tyconRef, kind, unnamedArgs, propVal, appliedToAGetterOrSetter, targetsOpt, range) - - - - - Indicates an attribute refers to a type defined in an imported F# assembly - - - - - Indicates an attribute refers to a type defined in an imported .NET assembly - - - - - Raising a measure to a rational power - - - - - The unit of measure '1', e.g. float = float<1> - - - - - An inverse of a units of measure expression - - - - - A product of two units of measure - - - - - A constant, leaf unit-of-measure such as 'kg' or 'm' - - - - - A variable unit-of-measure - - - - - Represents a unit of measure in the typed AST - - - - - Some constant, e.g. true or false for tupInfo - - - - - Get the ILTypeRef for the generated type implied by the anonymous type - - - - - Get the core of the display name for one of the fields of the anonymous record, by index - - - - - Get the display name for one of the fields of the anonymous record, by index - - - - - Create an AnonRecdTypeInfo from the basic data - - - - - Represents the information identifying an anonymous record - - - - - Indicates the type is a unit-of-measure expression being used as an argument to a type or member - - - - - Indicates the type is a variable type, whether declared, generalized or an inference type parameter - - 'flags' is a placeholder for future features, in particular nullness analysis - - - - - 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 type will never appear as an inferred type. They are the types given to - the temporaries arising out of pattern matching on union values. - - - - - Indicates the type is a function type. - - 'flags' is a placeholder for future features, in particular nullness analysis. - - - - - Indicates the type is a tuple type. elementTypes must be of length 2 or greater. - - - - - Indicates the type is an anonymous record type whose compiled representation is located in the given assembly - - - - - Indicates the type is built from a named type type a number of type arguments. - - 'flags' is a placeholder for future features, in particular nullness analysis - - - - - Indicates the type is a universal type, only used for types of values type members - - - - - For now, used only as a discriminant in error message. - See https://github.com/dotnet/fsharp/issues/2561 - - - - - Represents a type in the typed abstract syntax - - - - - Get a reference to the type containing this record field - - - - - Get the Entity for the type containing this record field - - - - - Try to dereference the reference - - - - - Get the signature range of the record field - - - - - Dereference the reference - - - - - Get the declaration range of the record field - - - - - Get the attributes associated with the compiled property of the record field - - - - - Get the name of the field - - - - - Get the name of the field, with backticks added for non-identifier names - - - - - Get the definition range of the record field - - - - - Represents a reference to a field in a record, class or struct - - - - - Dereference the reference to the union case - - - - - Get a reference to the type containing this union case - - - - - Get the Entity for the type containing this union case - - - - - Try to dereference the reference - - - - - Get the signature range of the union case - - - - - Get the resulting type of the union case - - - - - Get the range of the union case - - - - - Get the index of the union case amongst the cases - - - - - Get the definition range of the union case - - - - - Get the name of this union case - - - - - Get the attributes associated with the union case - - - - - Get the fields of the union case - - - - - Get a field of the union case by index - - - - - Represents a reference to a case of a union type - - - - - Indicates a reference to something bound in another CCU - - - - - Indicates a reference to something bound in this CCU - - - - - Get or set the signature for the value's XML documentation - - - - - Get the declared documentation for the value - - - - - Records the "extra information" for a value compiled as a method. - - This indicates the number of arguments in each position for a curried function. - - - - - The type of the value. May be a TType_forall for a generic value. - May be a type variable or type containing type variables during type inference. - - - - - Dereference the ValRef to a Val option. - - - - - The parent type or module, if any (ParentNone for expression bindings type parameters) - - - - - Get the type of the value after removing any generic type parameters - - - - - A unique stamp within the context of this invocation of the compiler process - - - - - The quotation expression associated with a value given the [<ReflectedDefinition>] tag - - - - - Get the information about a recursive value used during type inference - - - - - Get the public path to the value, if any? Should be set if type only if - IsMemberOrModuleBinding is set. - - - - - Get the name of the value, assuming it is compiled as a property. - - If this is a property then this is 'Foo' - - If this is an implementation of an abstract slot then this is the name of the property implemented by the abstract slot - - - - - Indicates if this value allows the use of an explicit type instantiation (i.e. does it itself have explicit type arguments, - or does it have a signature?) - - - - - Get the number of 'this'/'self' object arguments for the member. Instance extension members return '1'. - - - - - Indicates whether the inline declaration for the value indicate that the value must be inlined? - - - - - Is this a member, if so some more data about the member. - - - - - Get the apparent parent entity for a member - - - - - Indicates if this is inferred to be a method or function that definitely makes no critical tailcalls? - - - - - The value of a value or member marked with [<LiteralAttribute>] - - - - - Indicates if this value was declared to be a type function, e.g. "let f<'a> = typeof<'a>" - - - - - Indicates whether this value represents a property setter. - - - - - Indicates whether this value represents a property getter. - - - - - Indicates if this value was a member declared 'override' or an implementation of an interface slot - - - - - Indicates if this value is declared 'mutable' - - - - - Indicates if this is an F#-defined value in a module, or an extension member, but excluding compiler generated bindings from optimizations - - - - - Indicates if this is a 'this' value for a member? - - - - - Is this a member definition or module definition? - - - - - Indicates if this is a member - - - - - Indicates if this is an F#-defined instance member. - - Note, the value may still be (a) an extension member or (b) type abstract slot without - a true body. These cases are often causes of bugs in the compiler. - - - - - Indicates if this is a member generated from the de-sugaring of 'let' function bindings in the implicit class syntax? - - - - - Indicates if this is a constructor member generated from the de-sugaring of implicit constructor for a class type? - - - - - Indicates if this is an F#-defined extension member - - - - - Indicates if this member is an F#-defined dispatch slot. - - - - - Indicates if this is a 'this' value for an implicit ctor? - - - - - Indicates if this is an F#-defined 'new' constructor member - - - - - Indicates whether this value was generated by the compiler. - - Note: this is true for the overrides generated by hash/compare augmentations - - - - - 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. - - - - - Indicates if this is a 'base' value? - - - - - Get the inline declaration on the value - - - - - Get the inline declaration on a parameter or other non-function-declaration value, used for optimization - - - - - Gets the dispatch slots implemented by this method, either 0 or 1 - - - - - Get the type of the value including any generic type parameters - - - - - The display name of the value or method but without operator names decompiled type without backticks etc. - - This is very close to LogicalName except that properties have get_ removed and - interface implementation methods report the name of the implemented method. - - Note: avoid using this, we would like to remove it. All uses should be code-reviewed and - gradually eliminated in favour of DisplayName, DisplayNameCore or LogicalName. - - Note: here "Core" means "without added backticks or parens" - Note: here "Mangled" means "op_Addition" - - - If this is a property --> Foo - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an active pattern --> |A|_| - - If this is an operator --> op_Addition - - If this is an identifier needing backticks --> A-B - - - - - The display name of the value or method with operator names decompiled but without backticks etc. - - Note: here "Core" means "without added backticks or parens" - - - - - The full text for the value to show in error messages type to use in code. - This includes backticks, parens etc. - - - If this is a property --> Foo - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an active pattern --> (|A|_|) - - If this is an operator --> (+) - - If this is an identifier needing backticks --> ``A-B`` - - If this is a base value --> base - - If this is a value named ``base`` --> ``base`` - - - - - Dereference the ValRef to a Val. - - - - - Get the actual parent entity for the value (a module or a type), i.e. the entity under which the - value will appear in compiled code. For extension members this is the module where the extension member - is declared. - - This may fail for expression-bound values and parameters. - - - - - The name of the method in compiled code (with some exceptions where ilxgen.fs decides not to use a method impl) - - - - - Indicates if this is a 'base' or 'this' value? - - - - - Get the declared attributes for the value - - - - - Get the apparent parent entity for the value, i.e. the entity under with which the - value is associated. For extension members this is the nominal type the member extends. - For other values it is just the actual parent. - - - - - Get the value representing the accessibility of an F# type definition or module. - - - - - References are either local or nonlocal - - - - - Represents a type definition reference in the typed abstract syntax. - - - - - Represents a module-or-namespace reference in the typed abstract syntax. - - - - - Indicates a reference to something bound in another CCU - - - - - Indicates a reference to something bound in this CCU - - - - - The XML documentation sig-string of the entity, if any, to use to lookup an .xml doc file. This also acts - as a cache for this sig-string computation. - - - - - The XML documentation of the entity, if any. If the entity is backed by provided metadata - then this _does_ include this documentation. If the entity is backed by Abstract IL metadata - or comes from another F# assembly then it does not (because the documentation will get read from - an XML file). - - - - - Get the union cases type other union-type information for a type, if any - - - - - Get the union cases for a type, if any, as a list - - - - - Get the union cases for a type, if any - - - - - The information about the r.h.s. of a type definition, if any. For example, the r.h.s. of a union or record type. - - - - - Get the value representing the accessibility of the r.h.s. of an F# type definition. - - - - - The kind of the type definition - is it a measure definition or a type definition? - - - - - The logical contents of the entity when it is a type definition. - - - - - Indicates if this entity is an F# type abbreviation definition - - - - - Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - - - - - The on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - The on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - The on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Dereference the TyconRef to a Tycon option. - - - - - Get a list of all instance fields for F#-defined record, struct type class fields in this type definition, - excluding compiler-generate fields. - - - - - Get a list of all fields for F#-defined record, struct type class fields in this type definition, - including static fields, but excluding compiler-generate fields. - - - - - A unique stamp for this module, namespace or type definition within the context of this compilation. - Note that because of signatures, there are situations where in a single compilation the "same" - module, namespace or type may have two distinct Entity objects that have distinct stamps. - - - - - The signature definition location of the namespace, module or type - - - - - The resolved target of the reference - - - - - The code location where the module, namespace or type is defined. - - - - - Get a blob of data indicating how this type is nested in other namespaces, modules or types. - - - - - Indicates if we have pre-determined that a type definition has a default constructor. - - - - - The logical contents of the entity when it is a module or namespace fragment. - - - - - Gets the immediate members of an F# type definition, excluding compiler-generated ones. - Note: result is alphabetically sorted, then for each name the results are in declaration order - - - - - Gets all immediate members of an F# type definition keyed by name, including compiler-generated ones. - Note: result is a indexed table, type for each name the results are in reverse declaration order - - - - - The name of the namespace, module or type, possibly with mangling, e.g. List`1, List or FailureException - - - - - Indicate if this is a type whose r.h.s. is known to be a union type definition. - - - - - Indicates if this entity is an F# type abbreviation definition - - - - - Indicates if this is a struct or enum type definition, i.e. a value type definition, including struct records and unions - - - - - Indicates if the entity is an erased provided type definition that incorporates a static instantiation (type therefore in some sense compiler generated) - - - - - Indicates if the reference has been resolved - - - - - Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition. - - - - - Indicates if the entity is a provided namespace fragment - - - - - Indicates if the entity is a generated provided type definition, i.e. not erased. - - - - - Indicates if the entity is an erased provided type definition - - - - - Indicates if the entity is a provided namespace fragment - - - - - Indicates the type prefers the "tycon<a, b>" syntax for display etc. - - - - - Indicates if the entity is a namespace - - - - - Indicates the "tycon blob" is actually a module - - - - - Indicates if the entity is an F# module definition - - - - - Indicates if this is an F# type definition which is one of the special types in FSharp.Core.dll like 'float<_>' which - defines a measure type with a relation to an existing non-measure type as a representation. - - - - - Indicates if the reference is a local reference - - - - - Indicate if this is a type definition backed by Abstract IL metadata. - - - - - Indicates if this is a .NET-defined struct or enum type definition, i.e. a value type definition - - - - - Indicates if this is a .NET-defined enum type definition - - - - - Indicates if this is an F# type definition whose r.h.s. definition is unknown (i.e. a traditional ML 'abstract' type in a signature, - which in F# is called a 'unknown representation' type). - - - - - Indicates if this is an F#-defined value type definition, including struct records and unions - - - - - Indicates if this is an F# type definition known to be an F# class, interface, struct, - delegate or enum. This isn't generally a particularly useful thing to know, - it is better to use more specific predicates. - - - - - Indicates if this is an F#-defined interface type definition - - - - - Indicates if the entity represents an F# exception declaration. - - - - - Indicates if this is an F#-defined enum type definition - - - - - Indicates if this is an F#-defined delegate type definition - - - - - Indicates if the entity is erased, either a measure definition, or an erased provided type definition - - - - - Indicates if this is an enum type definition - - - - - Indicates if this is an F# type definition which is one of the special types in FSharp.Core.dll which uses - an assembly-code representation for the type, e.g. the primitive array type constructor. - - - - - Gets the immediate interface definitions of an F# type definition. Further interfaces may be supported through class type interface inheritance. - - - - - Gets the immediate interface types of an F# type definition. Further interfaces may be supported through class type interface inheritance. - - - - - The identifier at the point of declaration of the type definition. - - - - - Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata. - - - - - Get the Abstract IL scope, nesting type metadata for this - type definition, assuming it is backed by Abstract IL metadata. - - - - - Indicates if we have pre-determined that a type definition has a self-referential constructor using 'as x' - - - - - Gets any implicit hash/equals (with comparer argument) methods added to an F# record, union or struct type definition. - - - - - Gets any implicit hash/equals methods added to an F# record, union or struct type definition. - - - - - Gets any implicit CompareTo (with comparer argument) methods added to an F# record, union or struct type definition. - - - - - Gets any implicit CompareTo methods added to an F# record, union or struct type definition. - - - - - Get the blob of information associated with an F# object-model type definition, i.e. class, interface, struct etc. - - - - - The information about the r.h.s. of an F# exception definition, if any. - - - - - The display name of the namespace, module or type with <_, _, _> added for generic types, including static parameters - - Backticks are added implicitly for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, including static parameters - - Backticks are added implicitly for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, not including static parameters - - No backticks are added for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, not including static parameters - - Backticks are added implicitly for entities with non-identifier names - - - - - Dereference the TyconRef to a Tycon. Amortize the cost of doing this. - This path should not allocate in the amortized case - - - - - Demangle the module name, if FSharpModuleWithSuffix is used - - - - - The implementation definition location of the namespace, module or type - - - - - Gets the data indicating the compiled representation of a named type or module in terms of Abstract IL data structures. - - - - - Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures. - - - - - Get the cache of the compiled ILTypeRef representation of this module or type. - - - - - The compiled name of the namespace, module or type, e.g. FSharpList`1, ListModule or FailureException - - - - - Get a blob of data indicating how this type is nested inside other namespaces, modules type types. - - - - - Get a blob of data indicating how this type is nested inside other namespaces, modules type types. - - - - - Is the destination assembly available? - - - - - The F#-defined custom attributes of the entity, if any. If the entity is backed by Abstract IL or provided metadata - then this does not include any attributes from those sources. - - - - - Get a list of all instance fields for F#-defined record, struct type class fields in this type definition. - including hidden fields from the compilation of implicit class constructions. - - - - - Get a list of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get an array of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get a table of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get the value representing the accessibility of an F# type definition or module. - - - - - Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - - Lazy because it may read metadata, must provide a context "range" in case error occurs reading metadata. - - - - - Set the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - Set the on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - Set the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Resolve the reference - - - - - Get a union case of a type by name - - - - - Get a field by name. - - - - - Get a field by index in definition order - - - - - Get the path into the CCU referenced by the nonlocal reference. - - - - - Get the mangled name of the last item in the path of the nonlocal reference. - - - - - Get the all-but-last names of the path of the nonlocal reference. - - - - - Dereference the nonlocal reference, type raise an error if this fails. - - - - - Get the CCU referenced by the nonlocal reference. - - - - - Get the name of the assembly referenced by the nonlocal reference. - - - - - Try to find the entity corresponding to the given path, using type-providers to link the data - - - - - Try to find the entity corresponding to the given path in the given CCU - - - - - Try to link a non-local entity reference to an actual entity - - - - - Represents an index into the namespace/module structure of an assembly - - - - - Represents the path information for a reference to a value or member in another assembly, disassociated - from any particular reference. - - - - - The name of the value, or the full signature of the member - - - - - A reference to the entity containing the value or member. This will always be a non-local reference - - - - - For debugging - - - - - Get the thunk for the assembly referred to - - - - - Get the name of the assembly referred to - - - - - For debugging - - - - - Gets updated with 'true' if an abstract slot is implemented in the file being typechecked. Internal only. - - - - - Updated with the full implemented slotsig after interface implementation relation is checked - - - - - The parent type. For an extension member this is the type being extended - - - - - Represents the extra information stored for a member - - - - - See vflags section further below for encoding/decodings here - - - - - Mutable for unpickle linkage - - - - - Mutable for unpickle linkage - - - - - Mutable for unpickle linkage - - - - -Get the signature for the value's XML documentation - - - - -Get the signature for the value's XML documentation - - - - - Get the declared documentation for the value - - - - - Records the "extra information" for display purposes for expression-level function definitions - that may be compiled as closures (that is are not necessarily compiled as top-level methods). - - - - - Records the "extra information" for a value compiled as a method. - - This indicates the number of arguments in each position for a curried - functions, type relates to the F# spec for arity analysis. - For module-defined values, the currying is based - on the number of lambdas, type 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. - - - - - The type of the value. - May be a TType_forall for a generic value. - May be a type variable or type containing type variables during type inference. - - - - - Get the generic type parameters for the value - - - - - The parent type or module, if any (None for expression bindings type parameters) - - - - - Get the type of the value after removing any generic type parameters - - - - - A unique stamp within the context of this invocation of the compiler process - - - - - Range of the definition (signature) of the value, used by Visual Studio - - - - - The quotation expression associated with a value given the [<ReflectedDefinition>] tag - - - - - Get the information about the value used during type inference - - - - - The place where the value was defined. - - - - - Get the public path to the value, if any? Should be set if type only if - IsMemberOrModuleBinding is set. - - - - - The name of the property. - - If this is a property then this is 'Foo' - - - - - Indicates if this value allows the use of an explicit type instantiation (i.e. does it itself have explicit type arguments, - or does it have a signature?) - - - - - Get the number of 'this'/'self' object arguments for the member. Instance extension members return '1'. - - - - - Indicates whether the inline declaration for the value indicate that the value must be inlined? - - - - - Is this a member, if so some more data about the member. - - Note, the value may still be (a) an extension member or (b) type abstract slot without - a true body. These cases are often causes of bugs in the compiler. - - - - - Get the apparent parent entity for a member - - - - - Indicates if this is inferred to be a method or function that definitely makes no critical tailcalls? - - - - - The name of the method. - - If this is a property then this is 'get_Foo' or 'set_Foo' - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an extension member then this will be the simple name - - - - - The value of a value or member marked with [<LiteralAttribute>] - - - - - Indicates if this value was a member declared 'override' or an implementation of an interface slot - - - - - Indicates if this is declared 'mutable' - - - - - Indicates if this is an F#-defined value in a module, or an extension member, but excluding compiler generated bindings from optimizations - - - - - Indicates if this is a 'this' value for a member? - - - - - Is this a member definition or module definition? - - - - - Indicates if this is a member - - - - - Indicates if a value is linked to backing data yet. Only used during unpickling of F# metadata. - - - - - Indicates if this is a member, excluding extension members - - - - - Indicates if this is an F#-defined instance member. - - Note, the value may still be (a) an extension member or (b) type abstract slot without - a true body. These cases are often causes of bugs in the compiler. - - - - - Indicates if this is a member generated from the de-sugaring of 'let' function bindings in the implicit class syntax? - - - - - Indicates if this is a constructor member generated from the de-sugaring of implicit constructor for a class type? - - - - - Indicates if the value is pinned/fixed - - - - - Indicates if this is an F#-defined extension member - - - - - Indicates if this member is an F#-defined dispatch slot. - - - - - Indicates if this is a 'this' value for an implicit ctor? - - - - - Indicates if this is an F#-defined 'new' constructor member - - - - - Indicates whether this value was generated by the compiler. - - Note: this is true for the overrides generated by hash/compare augmentations - - - - - Indicates if this is something compiled into a module, i.e. a user-defined value, an extension member or a compiler-generated value - - - - - 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) - - - - - Indicates if the backing field for a static value is suppressed. - - - - - Indicates if this is a compiler-generated class constructor member - - - - - Indicates if this is a 'base' value? - - - - - Get the inline declaration on the value - - - - - Get the inline declaration on a parameter or other non-function-declaration value, used for optimization - - - - - Gets the dispatch slots implemented by this method - - - - - Indicates if the value will ignore byref scoping rules - - - - - Indicates if the value has a signature file counterpart - - - - - Indicates if this is ever referenced? - - - - - Indicates that this value's getter or setter are generated by the compiler - - - - - Get the type of the value including any generic type parameters - - - - - The display name of the value or method but without operator names decompiled type without backticks etc. - - This is very close to LogicalName except that properties have get_ removed and - interface implementation methods report the name of the implemented method. - - Note: avoid using this, we would like to remove it. All uses should be code-reviewed and - gradually eliminated in favour of DisplayName, DisplayNameCore or LogicalName. - - Note: here "Core" means "without added backticks or parens" - Note: here "Mangled" means "op_Addition" - - - If this is a property --> Foo - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an active pattern --> |A|_| - - If this is an operator --> op_Addition - - If this is an identifier needing backticks --> A-B - - - - - The display name of the value or method with operator names decompiled but without backticks etc. - - Note: here "Core" means "without added backticks or parens" - - - - - The full text for the value to show in error messages type to use in code. - This includes backticks, parens etc. - - - If this is a property --> Foo - - If this is an implementation of an abstract slot then this is the name of the method implemented by the abstract slot - - If this is an active pattern --> (|A|_|) - - If this is an operator --> (+) - - If this is an identifier needing backticks --> ``A-B`` - - If this is a base value --> base - - If this is a value named ``base`` --> ``base`` - - - - - Range of the definition (implementation) of the value, used by Visual Studio - - - - - Get the actual parent entity for the value (a module or a type), i.e. the entity under which the - value will appear in compiled code. For extension members this is the module where the extension member - is declared. - - - - - Indicates if this is a 'base' or 'this' value? - - - - - Get the declared attributes for the value - - - - - Records the "extra information" for parameters in implementation files if we've been able to correlate - them with lambda arguments. - - - - - Get the apparent parent entity for the value, i.e. the entity under with which the - value is associated. For extension members this is the nominal type the member extends. - For other values it is just the actual parent. - - - - - How visible is this value, function or member? - - - - - Set all the data on a value - - - - - Create a new value with empty, unlinked data. Only used during unpickling of F# metadata. - - - - - Create a new value with the given backing data. Only used during unpickling of F# metadata. - - - - - Link a value based on empty, unlinked data to the given data. Only used during unpickling of F# metadata. - - - - - The partial information used to index the methods of all those in a ModuleOrNamespace. - - - - - The full information used to identify a specific overloaded method amongst all those in a ModuleOrNamespace. - - - - - The name of the method in compiled code (with some exceptions where ilxgen.fs decides not to use a method impl) - - If this is a property then this is 'get_Foo' or 'set_Foo' - - If this is an implementation of an abstract slot then this may be a mangled name - - If this is an extension member then this will be a mangled name - - If this is an operator then this is 'op_Addition' - - - - - 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 collection of values. - - - - - XML documentation signature for the value - - - - - Is the value actually an instance method/property/event that augments - a type, type if so what name does it take in the IL? - MUTABILITY: for unpickle linkage - - - - - the signature xml doc for an item in an implementation file. - - - - - XML documentation attached to a value. - MUTABILITY: for unpickle linkage - - - - - How visible is this? - MUTABILITY: for unpickle linkage - - - - - Records the "extra information" for parameters in implementation files if we've been able to correlate - them with lambda arguments. - - - - - Records the "extra information" for display purposes for expression-level function definitions - that may be compiled as closures (that is are not necessarily compiled as top-level methods). - - - - - Records the "extra information" for a value compiled as a method (rather - than a closure or a local), including argument names, attributes etc. - - - - - What is the original, unoptimized, closed-term definition, if any? - Used to implement [<ReflectedDefinition>] - - - - - If this field is populated, this is the implementation range for an item in a signature, otherwise it is - the signature range for an item in an implementation - - - - - MUTABILITY: for unpickle linkage - - - - - The full type of the value for the purposes of linking. May be None for non-members, since they can't be overloaded. - - - - - The partial information used to index the value in a ModuleOrNamespace. - - - - - The full information used to identify a specific overloaded method - amongst all those in a ModuleOrNamespace. - - - - - Indicates the total argument count of the member. - - - - - Indicates the logical name of the member. - - - - - Indicates if the member is an override. - - - - - The name of the type with which the member is associated. None for non-member values. - - - - - The partial information used to index the methods of all those in a ModuleOrNamespace. - - - - - Indicates a trait is solved by a 'fake' instance of an operator, like '+' on integers - - - - - ClosedExprSln expr - - Indicates a trait is solved by an erased provided expression - - - - - ILMethSln(ty, extOpt, ilMethodRef, minst) - - Indicates a trait is solved by a .NET method. - ty -- the type type its instantiation - extOpt -- information about an extension member, if any - ilMethodRef -- the method that solves the trait constraint - minst -- the generic method instantiation - staticTyOpt -- the static type governing a static virtual call, if any - - - - - Indicates a trait is solved by an F# anonymous record field. - - - - - FSRecdFieldSln(tinst, rfref, isSetProp) - - Indicates a trait is solved by an F# record field. - tinst -- the instantiation of the declaring type - rfref -- the reference to the record field - isSetProp -- indicates if this is a set of a record field - - - - - FSMethSln(ty, vref, minst) - - Indicates a trait is solved by an F# method. - ty -- the type type its instantiation - vref -- the method that solves the trait constraint - staticTyOpt -- the static type governing a static virtual call, if any - minst -- the generic method instantiation - - - - - Represents the solution of a member constraint during inference. - - - - - Indicates the signature of a member constraint. Contains a mutable solution cell - to store the inferred solution of the constraint. - - - - - Get or set the solution of the member constraint during inference - - - - - Get the types that may provide solutions for the traits - - - - - Get or set the solution of the member constraint during inference - - - - - Get the member name associated with the member constraint. For preop - - - - - Get the member flags associated with the member constraint. - - - - - Get the return type recorded in the member constraint. - - - - - Get the raw object and argument types recorded in the member constraint. This includes the object instance type - instance members. This may be empty for property traits e.g. - "(static member Zero: ^T)" - or unit-taking methods - "(static member get_Zero: unit -> ^T)" - See also extension members GetCompiledArgumentTypes and GetLogicalArgumentTypes - - - - - The member kind is irrelevant to the logical properties of a trait. However it adjusts - the extension property MemberDisplayNameCore - - - - - The specification of a member constraint that must be solved - - - - - Get the return type recorded in the member constraint. - - - - - Get the member name associated with the member constraint. - - - - - A constraint that a type is .NET unmanaged type - - - - - A constraint that a type is a delegate from the given tuple of args to the given return type - - - - - A constraint that a type does not have the Equality(false) attribute, or is not a structural type with this attribute, with special rules for some known structural container types - - - - - A constraint that a type implements IComparable, with special rules for some known structural container types - - - - - A constraint that a type is an enum with the given underlying - - - - - A constraint that a type has a parameterless constructor - - - - - A constraint that a type is a simple choice between one of the given ground types. Only arises from 'printf' format strings. See format.fs - - - - - A constraint that a type is a reference type - - - - - A constraint that a type is a non-Nullable value type - These are part of .NET's model of generic constraints, type in order to - generate verifiable code we must attach them to F# generalized type variables as well. - - - - - A constraint that a type has a member with the given signature - - - - - A constraint that a type has a 'null' value - - - - - A constraint for a default value for an inference type variable should it be neither generalized nor solved - - - - - A constraint that a type is a subtype of the given type - - - - - Represents a constraint on a type parameter or type - - - - - The optional data for the type parameter - - - - - A cached TAST type used when this type variable is used as type. - - - - - An inferred equivalence for a type inference variable. - - - - - The unique stamp of the type parameter - MUTABILITY: for linking when unpickling - - - - - The flag data for the type parameter - - - - - MUTABILITY: we set the names of generalized inference type parameters to make the look nice for IL code generation - The identifier for the type parameter - - - - - Get the XML documetnation for the type parameter - - - - - Indicates if the type variable has a static "head type" requirement, i.e. ^a variables used in FSharp.Core type member constraints. - - - - - The unique stamp of the type parameter - - - - - The inferred equivalence for the type inference variable, if any. - - - - - Indicates if the type variable can be solved or given new constraints. The status of a type variable - generally always evolves towards being either rigid or solved. - - - - - The range of the identifier for the type parameter definition - - - - - The name of the type parameter - - - - - Indicates whether a type variable can be instantiated by types or units-of-measure. - - - - - Indicates if a type variable has been solved. - - - - - Indicates if a type variable has been linked. Only used during unpickling of F# metadata. - - - - - Indicates if the type inference variable was generated after an error when type checking expressions or patterns - - - - - Indicates whether a type variable is erased in compiled .NET IL code, i.e. whether it is a unit-of-measure variable - - - - - Indicates if the type variable is compiler generated, i.e. is an implicit type inference variable - - - - - Indicates that whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) - - - - - The identifier for a type parameter definition - - - - - Get the IL name of the type parameter - - - - - Indicates that whether or not a generic type definition satisfies the equality constraint is dependent on whether this type variable satisfies the equality constraint. - - - - - Indicates if a type parameter is needed at runtime type may not be eliminated - - - - - Indicates the display name of a type variable - - - - - The inferred constraints for the type inference variable, if any - - - - - Indicates that whether or not a generic type definition satisfies the comparison constraint is dependent on whether this type variable satisfies the comparison constraint. - - - - - The declared attributes of the type parameter. Empty for type inference variables type parameters from .NET. - - - - - Links a previously unlinked type variable to the given data. Only used during unpickling of F# metadata. - - - - - Sets whether a type variable has a static requirement - - - - - Sets the rigidity of a type variable - - - - - Set whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) - - - - - Sets the identifier associated with a type variable - - - - - Set the IL name of the type parameter - - - - - Sets whether the equality constraint of a type definition depends on this type variable - - - - - Sets whether a type variable is required at runtime - - - - - Adjusts the constraints associated with a type variable - - - - - Sets whether a type variable is compiler generated - - - - - Sets whether the comparison constraint of a type definition depends on this type variable - - - - - Set the attributes on the type parameter - - - - - Creates a type variable that contains empty data, type is not yet linked. Only used during unpickling of F# metadata. - - - - - Creates a type variable based on the given data. Only used during unpickling of F# metadata. - - - - - Links a previously unlinked type variable to the given data. Only used during unpickling of F# metadata. - - - - - A declared generic type/measure parameter, or a type/measure inference variable. - - - - - The declared attributes of the type parameter. Empty for type inference variables. - - - - - The inferred constraints for the type parameter or inference variable. - - - - - The documentation for the type parameter. Empty for inference variables. - MUTABILITY: for linking when unpickling - - - - - MUTABILITY: we set the names of generalized inference type parameters to make the look nice for IL code generation - The storage for the IL name for the type parameter. - - - - - Represents less-frequently-required data about a type parameter of type inference variable - - - - - Indicates the construct can only be accessed from any code in the given type constructor, module or assembly. [] indicates global scope. - - - - - Represents the constraint on access for a construct - - - - - Represents a type or exception definition in the typed AST - - - - - Represents a module or namespace definition in the typed AST - - - - - Get a table of types defined within this module, namespace or type. The - table is indexed by both name type generic arity. This means that for generic - types "List`1", the entry (List, 1) will be present. - - - - - Get a table of types defined within this module, namespace or type. The - table is indexed by both name and, for generic types, also by mangled name. - - - - - Get a list of types defined within this module, namespace or type. - - - - - Get a list of type type exception definitions defined within this module, namespace or type. - - - - - Get a table of nested module type namespace fragments indexed by demangled name (so 'ListModule' becomes 'List') - - - - - Namespace or module-compiled-as-type? - - - - - Get a list of module type namespace definitions defined within this module, namespace or type. - - - - - Get a table of F# exception definitions indexed by demangled name, so 'FailureException' is indexed by 'Failure' - - - - - Get a list of F# exception definitions defined within this module, namespace or type. - - - - - Get a table of values indexed by logical name - - - - - Get a table of values type members indexed by partial linkage key, which includes name, the mangled name of the parent type (if any), - type the method argument count (if any). - - - - - Compute a table of values type members indexed by logical name. - - - - - Values, including members in F# types in this module-or-namespace-fragment. - - - - - Get a table of entities indexed by both logical name - - - - - Get a table of entities indexed by both logical type compiled names - - - - - Type, mapping mangled name to Tycon, e.g. - - - - - Get a table of the active patterns defined in this module. - - - - - Try to find the member with the given linkage key in the given module. - - - - - Return a new module or namespace type with a value added. - - - - - Mutation used in hosting scenarios to hold the hosted types in this module or namespace - - - - - Mutation used during compilation of FSharp.Core.dll - - - - - Return a new module or namespace type with an entity added. - - - - - Represents the contents of of a module of namespace - - - - - Indicates that an exception is abstract, i.e. is in a signature file, type we do not know the representation - - - - - Indicates that an exception carries the given record of values - - - - - Indicates that an exception is shorthand for the given .NET exception type - - - - - Indicates that an exception is an abbreviation for the given exception - - - - - Represents the implementation of an F# exception definition. - - - - - If this field is populated, this is the implementation range for an item in a signature, otherwise it is - the signature range for an item in an implementation - - - - - Name/declaration-location of the field - - - - - Attributes attached to generated field - - - - - Attributes attached to generated property - - - - - Indicates the declared visibility of the field, not taking signatures into account - - - - - The default initialization info, for static literals - - - - - Indicates a compiler generated field, not visible to Intellisense or name resolution - - - - - Indicates a volatile field - - - - - Indicates a static field - - - - - The type of the field, w.r.t. the generic parameters of the enclosing type constructor - - - - - XML Documentation signature for the field - - - - - Documentation for the field from signature file - - - - - Documentation for the field - - - - - Is the field declared mutable in F#? - - - - - Get or set the XML documentation signature for the field - - - - - Get or set the XML documentation signature for the field - - - - - XML Documentation signature for the field - - - - - Get the signature location of the field - - - - - Get the declaration location of the field - - - - - Attributes attached to generated property - - - - - Name of the field - - - - - The default initialization info, for static literals - - - - - Indicates if the field is zero-initialized - - - - - Indicates a volatile field - - - - - Indicates a static field - - - - - Is the field declared mutable in F#? - - - - - Indicates a compiler generated field, not visible to Intellisense or name resolution - - - - - Name/declaration-location of the field - - - - - The type of the field, w.r.t. the generic parameters of the enclosing type constructor - - - - - Attributes attached to generated field - - - - - Name of the field. For fields this is the same as the logical name. - - - - - Name of the field - - - - - Get the definition location of the field - - - - - Indicates the declared visibility of the field, not taking signatures into account - - - - - Represents a class, struct, record or exception field in an F# type, exception or union-case definition. - This may represent a "field" in either a struct, class, record or union. - - - - - Attributes, attached to the generated static method to make instances of the case - - - - - Indicates the declared visibility of the union constructor, not taking signatures into account - - - - - If this field is populated, this is the implementation range for an item in a signature, otherwise it is - the signature range for an item in an implementation - - - - - Name/range of the case - - - - - XML documentation signature for the case - - - - - Documentation for the case from signature file - - - - - Documentation for the case - - - - - Return type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it - - - - - Data carried by the case. - - - - - Get the signature location of the union case - - - - - Get the full array of fields of the union case - - - - - Get the full list of fields of the union case - - - - - Get the declaration location of the union case - - - - - Get the logical name of the union case - - - - - Indicates if the union case has no fields - - - - - Get the core of the display name of the union case - - Backticks and parens are not added for non-identifiers. - - Note logical names op_Nil type op_ColonColon become [] and :: respectively. - - - - - Get the display name of the union case - - Backticks are added for non-identifiers. - - Note logical names op_Nil and op_ColonColon become ([]) and (::) respectively. - - - - - Get the definition location of the union case - - - - - Get the name of the case in generated IL code. - Note logical names `op_Nil` type `op_ColonColon` become `Empty` type `Cons` respectively. - This is because this is how ILX union code gen expects to see them. - - - - - Get a field of the union case by name - - - - - Get a field of the union case by position - - - - - Represents a union case in an F# type definition - - - - - The ILX data structure representing the discriminated union. - - - - - The cases contained in the discriminated union. - - - - - Get the union cases as a list - - - - - Represents the union cases type related information in an F# type definition - - - - - The cases of the discriminated union, indexed by name. - - - - - The cases of the discriminated union, in declaration order. - - - - - Get the union cases as a list - - - - - Get a union case by index - - - - - Represents union cases in an F# type definition - - - - - The fields of the record, indexed by name. - - - - - The fields of the record, in declaration order. - - - - - Get all non-compiler-generated instance fields as a list - - - - - Get all non-compiler-generated fields as a list - - - - - Get all the fields as a list - - - - - Get a field by name - - - - - Get a field by index - - - - - Represents record fields in an F# type definition - - - - - The fields of the class, struct or enum - - - - - The declared abstract slots of the class, interface or struct - - - - - Indicates whether the type declaration is an F# class, interface, enum, delegate or struct - - - - - Indicates the cases of a union type - - - - - Represents member values type class fields relating to the F# object model - - - - - Indicates the type is an F#-declared enumeration - - - - - Indicates the type is an F#-declared delegate with the given Invoke signature - - - - - Indicates the type is an F#-declared struct - - - - - Indicates the type is an F#-declared interface - - - - - Indicates the type is an F#-declared class (also used for units-of-measure) - - - - - Indicates the type is an F#-declared union - - - - - Indicates the type is an F#-declared record - - - - - Indicates the type is generated, but type-relocation is suppressed - - - - - Indicates the type is erased - - - - - A flag read from the provided type type used to compute basic properties of the type definition. - Reading is delayed, since it looks at the .BaseType - - - - - A type read from the provided type type used to compute basic properties of the type definition. - Reading is delayed, since it does an import on the underlying type - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - A flag read eagerly from the provided type type used to compute basic properties of the type definition. - - - - - The base type of the type. We use it to compute the compiled representation of the type for erased types. - Reading is delayed, since it does an import on the underlying type - - - - - The underlying System.Type (wrapped as a ProvidedType to make sure we don't call random things on - System.Type, type wrapped as Tainted to make sure we track which provider this came from, for reporting - error messages) - - - - - The parameters given to the provider that provided to this type. - - - - - Indicates if the provided type is generated, i.e. not erased - - - - - Gets the base type of an erased provided type - - - - - The information kept about a provided type - - - - - The 'NoRepr' value here has four meanings: - (1) it indicates 'not yet known' during the first 2 phases of establishing type definitions - (2) it indicates 'no representation', i.e. 'type X' in signatures - (3) it is the setting used for exception definitions (!) - (4) it is the setting used for modules type namespaces. - - It would be better to separate the "not yet known" type other cases out. - The information for exception definitions should be folded into here. - - - - - Indicates the representation information for a provided namespace. - - - - - TProvidedTypeRepr - - Indicates the representation information for a provided type. - - - - - Indicates the type is parameterized on a measure (e.g. float<_>) but erases to some other type (e.g. float) - - - - - Indicates the type is implemented as IL assembly code using the given closed Abstract IL type - - - - - Indicates the type is a type from a .NET assembly without F# metadata. - - - - - Indicates the type is a class, struct, enum, delegate or interface - - - - - The information for the contents of a type. Also used for a provided namespace. - - - - - Set to true if the type is determined to be abstract - - - - - Set to true at the end of the scope where proper augmentations are allowed - - - - - Super type, if any - - - - - Interface implementations - boolean indicates compiler-generated - - - - - Properties, methods etc. as lookup table - - - - - Properties, methods etc. in declaration order. The boolean flag for each indicates if the - member is known to be an explicit interface implementation. This must be computed and - saved prior to remapping assembly information. - - - - - 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 - - - - - 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. - - - - - 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. - - - - - 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. - - - - - 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. - - - - - An AbstractIL type representation that may include type variables - - - - - An AbstractIL type representation that is just the name of a type. - - CompiledTypeRepr.ILAsmNamed (ilTypeRef, ilBoxity, ilTypeOpt) - - The ilTypeOpt is present for non-generic types. It is an ILType corresponding to the first two elements of the case. This - prevents reallocation of the ILType each time we need to generate it. For generic types, it is None. - - - - - Specifies the compiled representations of type type exception definitions. Basically - just an ILTypeRef. Computed type cached by later phases. Stored in - type type exception definitions. Not pickled. Store an optional ILType object for - non-generic types. - - - - - Represents the declaring entity of a type definition, if any - - - - - Used during codegen to hold the ILX representation indicating how to access the type - - - - - The stable path to the type, e.g. Microsoft.FSharp.Core.FSharpFunc`2 - - - - - The stable path to the type, e.g. Microsoft.FSharp.Core.FSharpFunc`2 - - - - - This field is used when the 'tycon' is really a module definition. It holds statically nested type definitions type nested modules - - - - - The methods type properties of the type - - - - - The declared representation of the type, i.e. record, union, class etc. - - - - - The declared attributes for the type - - - - - The declaration location for the type constructor - - - - - The name of the type, possibly with `n mangling - - - - - The unique stamp of the "tycon blob". Note the same tycon in signature type implementation get different stamps - - - - - The declared type parameters of the type - - - - - The XML documentation sig-string of the entity, if any, to use to lookup an .xml doc file. This also acts - as a cache for this sig-string computation. - - - - - The XML documentation sig-string of the entity, if any, to use to lookup an .xml doc file. This also acts - as a cache for this sig-string computation. - - - - - The XML documentation of the entity, if any. If the entity is backed by provided metadata - then this _does_ include this documentation. If the entity is backed by Abstract IL metadata - or comes from another F# assembly then it does not (because the documentation will get read from - an XML file). - - - - - Get the union cases type other union-type information for a type, if any - - - - - Get the union cases for a type, if any, as a list - - - - - Get the union cases for a type, if any - - - - - The information about the r.h.s. of a type definition, if any. For example, the r.h.s. of a union or record type. - - - - - Get the value representing the accessibility of the r.h.s. of an F# type definition. - - - - - The kind of the type definition - is it a measure definition or a type definition? - - - - - The logical contents of the entity when it is a type definition. - - - - - Get the type abbreviated by this type definition, if it is an F# type abbreviation definition - - - - - Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - - - - - These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - The on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - These two bits represents the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Get a list of all instance fields for F#-defined record, struct type class fields in this type definition, - excluding compiler-generate fields. - - - - - Get a list of all fields for F#-defined record, struct type class fields in this type definition, - including static fields, but excluding compiler-generate fields. - - - - - A unique stamp for this module, namespace or type definition within the context of this compilation. - Note that because of signatures, there are situations where in a single compilation the "same" - module, namespace or type may have two distinct Entity objects that have distinct stamps. - - - - - The code location where the module, namespace or type is defined. - - - - - Get a blob of data indicating how this type is nested in other namespaces, modules or types. - - - - - Indicates if we have pre-determined that a type definition has a default constructor. - - - - - The logical contents of the entity when it is a module or namespace fragment. - - - - - Gets the immediate members of an F# type definition, excluding compiler-generated ones. - Note: result is alphabetically sorted, then for each name the results are in declaration order - - - - - Gets all immediate members of an F# type definition keyed by name, including compiler-generated ones. - Note: result is a indexed table, type for each name the results are in reverse declaration order - - - - - The name of the namespace, module or type, possibly with mangling, e.g. List`1, List or FailureException - - - - - Indicate if this is a type whose r.h.s. is known to be a union type definition. - - - - - Indicates if this entity is an F# type abbreviation definition - - - - - Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition that is a value type. - - - - - Indicates if this is a struct or enum type definition, i.e. a value type definition, including struct records and unions - - - - - Indicates if this is an F# type definition whose r.h.s. is known to be a record type definition. - - - - - Indicates if the entity is a provided namespace fragment - - - - - Indicates if the entity is a generated provided type definition, i.e. not erased. - - - - - Indicates if the entity is an erased provided type definition - - - - - Indicates if the entity is a provided type or namespace definition - - - - - Indicates the type prefers the "tycon<a, b>" syntax for display etc. - - - - - Indicates if the entity is a namespace - - - - - Indicates the Entity is actually a module or namespace, not a type definition - - - - - Indicates if the entity is an F# module definition - - - - - Indicates if this is an F# type definition which is one of the special types in FSharp.Core.dll like 'float<_>' which - defines a measure type with a relation to an existing non-measure type as a representation. - - - - - Indicates if the entity is linked to backing data. Only used during unpickling of F# metadata. - - - - - Indicates if the entity has an implicit namespace - - - - - Indicate if this is a type definition backed by Abstract IL metadata. - - - - - Indicates if this is a .NET-defined struct or enum type definition - - - - - Indicates if this is a .NET-defined enum type definition - - - - - Indicates if this is an F# type definition whose r.h.s. definition is unknown (i.e. a traditional ML 'abstract' type in a signature, - which in F# is called a 'unknown representation' type). - - - - - Indicates if this is an F#-defined value type definition, including struct records and unions - - - - - Indicates if this is an F# type definition known to be an F# class, interface, struct, - delegate or enum. This isn't generally a particularly useful thing to know, - it is better to use more specific predicates. - - - - - Indicates if this is an F#-defined interface type definition - - - - - Indicates if the entity represents an F# exception declaration. - - - - - Indicates if this is an F#-defined enum type definition - - - - - Indicates if this is an F#-defined delegate type definition - - - - - Indicates if this is an F#-defined class type definition - - - - - Indicates if the entity is erased, either a measure definition, or an erased provided type definition - - - - - Indicates if this is an enum type definition - - - - - Indicates if this is an F# type definition which is one of the special types in FSharp.Core.dll which uses - an assembly-code representation for the type, e.g. the primitive array type constructor. - - - - - Gets the immediate interface definitions of an F# type definition. Further interfaces may be supported through class type interface inheritance. - - - - - Gets the immediate interface types of an F# type definition. Further interfaces may be supported through class type interface inheritance. - - - - - The identifier at the point of declaration of the type definition. - - - - - Get the Abstract IL metadata for this type definition, assuming it is backed by Abstract IL metadata. - - - - - Get the Abstract IL scope, nesting type metadata for this - type definition, assuming it is backed by Abstract IL metadata. - - - - - Indicates if the value has a signature file counterpart - - - - - Indicates if we have pre-determined that a type definition has a self-referential constructor using 'as x' - - - - - Gets any implicit hash/equals (with comparer argument) methods added to an F# record, union or struct type definition. - - - - - Gets any implicit hash/equals methods added to an F# record, union or struct type definition. - - - - - Gets any implicit CompareTo (with comparer argument) methods added to an F# record, union or struct type definition. - - - - - Gets any implicit CompareTo methods added to an F# record, union or struct type definition. - - - - - Get the blob of information associated with an F# object-model type definition, i.e. class, interface, struct etc. - - - - - The information about the r.h.s. of an F# exception definition, if any. - - - - - The display name of the namespace, module or type with <_, _, _> added for generic types, plus static parameters if any - For modules the Module suffix is removed if FSharpModuleWithSuffix is used. - - Backticks are added implicitly for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, including static parameters if any - For modules the Module suffix is removed if FSharpModuleWithSuffix is used. - - Backticks are added implicitly for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, type no static parameters. - For modules the Module suffix is removed if FSharpModuleWithSuffix is used. - - No backticks are added for entities with non-identifier names - - - - - The display name of the namespace, module or type, e.g. List instead of List`1, type no static parameters - For modules the Module suffix is removed if FSharpModuleWithSuffix is used. - - Backticks are added implicitly for entities with non-identifier names - - - - - Demangle the module name, if FSharpModuleWithSuffix is used - - - - - The range in the implementation, adjusted for an item in a signature - - - - - Gets the data indicating the compiled representation of a named type or module in terms of Abstract IL data structures. - - - - - Gets the data indicating the compiled representation of a type or module in terms of Abstract IL data structures. - - - - - Get the cache of the compiled ILTypeRef representation of this module or type. - - - - - The compiled name of the namespace, module or type, e.g. FSharpList`1, ListModule or FailureException - - - - - Get a blob of data indicating how this type is nested inside other namespaces, modules type types. - - - - - Get a blob of data indicating how this type is nested inside other namespaces, modules type types. - - - - - The F#-defined custom attributes of the entity, if any. If the entity is backed by Abstract IL or provided metadata - then this does not include any attributes from those sources. - - - - - Get a list of all instance fields for F#-defined record, struct type class fields in this type definition. - including hidden fields from the compilation of implicit class constructions. - - - - - Gets all implicit hash/equals/compare methods added to an F# record, union or struct type definition. - - - - - Get a list of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get an array of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get a table of fields for all the F#-defined record, struct type class fields in this type definition, including - static fields, 'val' declarations type hidden fields from the compilation of implicit class constructions. - - - - - Get the value representing the accessibility of an F# type definition or module. - - - - - Get the type parameters for an entity that is a type declaration, otherwise return the empty list. - - Lazy because it may read metadata, must provide a context "range" in case error occurs reading metadata. - - - - - Sets the structness of a record or union type definition - - - - - Set the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - Set the on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - Set the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Set the custom attributes on an F# type definition. - - - - - Create a new entity with empty, unlinked data. Only used during unpickling of F# metadata. - - - - - Create a new entity with the given backing data. Only used during unpickling of F# metadata. - - - - - Link an entity based on empty, unlinked data to the given data. Only used during unpickling of F# metadata. - - - - - Get a union case of a type by name - - - - - Get a field by name. - - - - - Get a field by index in definition order - - - - - Represents a type definition, exception definition, module definition or namespace definition. - - - - - Field used when the 'tycon' is really an exception definition - - - - - Indicates how visible is the entity is. - - - - - The declared accessibility of the representation, not taking signatures into account - - - - - If non-None, indicates the type is an abbreviation for another type. - - - - - The XML document signature for this entity - - - - - the signature xml doc for an item in an implementation file. - - - - - The declared documentation for the type or module - - - - - If this field is populated, this is the implementation range for an item in a signature, otherwise it is - the signature range for an item in an implementation - - - - - The name of the type, possibly with `n mangling - - - - - String 'Module' off an F# module name, if FSharpModuleWithSuffix is used - - - - - The information ILXGEN needs about the location of an item - - - - - A public path records where a construct lives within the global namespace - of a CCU. - - - - - Indicates that the sourcecode had a namespace. - If false, this namespace was implicitly constructed during type checking. - - - - - Indicates that a 'module' is really a namespace - - - - - Indicates that a module is compiled to a class with the same name as the original module - - - - - Indicates that a module is compiled to a class with the "Module" suffix added. - - - - - These two bits represents the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - These two bits represents the on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - These two bits represents the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - This bit is reserved for us in the pickle format, see pickle.fs, it's being listed here to stop it ever being used for anything else - - - - - Get the flags as included in the F# binary metadata - - - - - This bit represents a F# record that is a value type, or a struct record. - - - - - Indicates the type prefers the "tycon<a, b>" syntax for display etc. - - - - - Indicates the Entity is actually a module or namespace, not a type definition - - - - - Adjust the on-demand analysis about whether the entity has the IsReadOnly attribute - - - - - Adjust the on-demand analysis about whether the entity has the IsByRefLike attribute - - - - - Adjust the on-demand analysis about whether the entity is assumed to be a readonly struct - - - - - Encode entity flags into a bit field. We leave lots of space to allow for future expansion. - - - - - Indicates if the type variable has a static "head type" requirement, i.e. ^a variables used in FSharp.Core type member constraints. - - - - - Indicates if the type variable can be solved or given new constraints. The status of a type variable - generally always evolves towards being either rigid or solved. - - - - - Get the flags as included in the F# binary metadata. We pickle this as int64 to allow for future expansion - - - - - Indicates whether a type variable can be instantiated by types or units-of-measure. - - - - - Indicates if the type inference variable was generated after an error when type checking expressions or patterns - - - - - Indicates if the type variable is compiler generated, i.e. is an implicit type inference variable - - - - - Indicates that whether this type parameter is a compat-flex type parameter (i.e. where "expr :> tp" only emits an optional warning) - - - - - Indicates that whether or not a generic type definition satisfies the equality constraint is dependent on whether this type variable satisfies the equality constraint. - - - - - Indicates if a type parameter is needed at runtime type may not be eliminated - - - - - Indicates that whether or not a generic type definition satisfies the comparison constraint is dependent on whether this type variable satisfies the comparison constraint. - - - - - Encode typar flags into a bit field - - - - - Indicates the type parameter derives from an '_' anonymous type - For units-of-measure, we give a warning if this gets solved to '1' - - - - - Indicates the type parameter is an inference variable may be solved - - - - - Indicates we give a warning if the type parameter is ever solved - - - - - Indicates the type parameter can't be solved, but the variable is not set to "rigid" until after inference is complete - - - - - Indicates the type parameter can't be solved - - - - - Indicates if the type variable can be solved or given new constraints. The status of a type variable - evolves towards being either rigid or solved. - - - - - Represents the kind of a type parameter - - - - - Get the flags as included in the F# binary metadata - - - - - Flags on values - - - - - Indicates the 'this' value specified in a memberm e.g. 'x' in 'member x.M() = 1' - - - - - Indicates a normal value - - - - - Indicates the value called 'base' available for calling base class members - - - - - Indicates a ref-cell holding 'this' or the implicit 'this' used throughout an - implicit constructor to access type set values - - - - - Indicates the type parameter is needed at runtime type may not be eliminated - - - - - Indicates the type parameter is not needed at runtime type may be eliminated - - - - - Indicates if a type parameter is needed at runtime type may not be eliminated - - - - - The normal value for this flag when the value is not within its recursive scope - - - - - Set while the value is within its recursive scope. The flag indicates if the value has been eagerly generalized type accepts generic-recursive calls - - - - - A flag associated with values that indicates whether the recursive scope of the value is currently being processed, type - if the value has been generalized or not as yet. - - - - - Indicates the value must never be inlined by the optimizer - - - - - Indicates the value may optionally be inlined by the optimizer - - - - - Indicates the value is inlined but the .NET IL code for the function still exists, e.g. to satisfy interfaces on objects, but that it is also always inlined - - - - - Returns true if the implementation of a value must always be inlined - - - - - Defines the typed abstract syntax intermediate representation used throughout the F# compiler. - - - - - Given (newPath, oldPath) replace oldPath by newPath in the TAccess. - - - - - Primitive routine to compare two ValRef's for equality. On the whole value identity is not particularly - significant in F#. However it is significant for - (a) Active Patterns - (b) detecting uses of "special known values" from FSharp.Core.dll, such as 'seq' - and quotation splicing - - Note this routine doesn't take type forwarding into account - - - - - Primitive routine to compare two UnionCaseRef's for equality - - - - - Primitive routine to compare two EntityRef's for equality - This takes into account the possibility that they may have type forwarders - - - - - Compare two EntityRef's for equality when compiling fslib (FSharp.Core.dll) - - - - - 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. - - - - - From Ref_private to Ref_nonlocal when exporting data. - - - - - From Ref_private to Ref_nonlocal when exporting data. - - - - - Detect a use of a nominal type, including type abbreviations. - - - - - Make a reference to a union case for type in a module or namespace - - - - - For dereferencing in the middle of a pattern - - - - - Equality on CCU references, implemented as reference equality except when unresolved - - - - - Equality on value specs, implemented as reference equality - - - - - Equality on type variables, implemented as reference equality. This should be equivalent to using typarEq. - - - - - Metadata on values (names of arguments etc. - - - - - Indicates if we can use System.Array.Empty when emitting IL for empty array literals - - - - - Memoization table to help minimize the number of ILSourceDocument objects we create - - - - - Are we assuming all code gen is for F# interactive, with no static linking - - - - - Indicates if we can use System.Array.Empty when emitting IL for empty array literals - - - - - Indicates if we are generating witness arguments for SRTP constraints. Only done if the FSharp.Core - supports witness arguments. - - - - - Find an FSharp.Core operator that corresponds to a trait witness - - - - - Find an FSharp.Core LaguagePrimitives dynamic function that corresponds to a trait witness, e.g. - AdditionDynamic for op_Addition. Also work out the type instantiation of the dynamic function. - - - - - For debugging - - - - - For debugging - - - - - For debugging - - - - - For debugging - - - - - Represents an intrinsic value from FSharp.Core known to the compiler - - - - - Defines the global environment for all type checking. - - The environment (TcGlobals) are well-known 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. - - - - - An immutable mappping from witnesses to some data. - - Note: this uses an immutable HashMap/Dictionary with an IEqualityComparer that captures TcGlobals, see EmptyTraitWitnessInfoHashMap - - - - - Represents metadata extracted from a nominal type - - - - - A set of function parameters (visitor) for folding over expressions - - - - - The empty table representing no hiding - - - - - A set of tables summarizing the items hidden by a signature - - - - - The list of corresponding modules, namespaces and type definitions - - - - - The list of corresponding values - - - - - The empty table - - - - - 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. - - - - - 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.fs - - 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. - - - - - Indicate what should happen to value definitions when copying expressions - - - - - A flag to govern whether ValReprInfo inference should be type-directed or syntax-directed when - inferring from a lambda expression. - - - - - If set, signatures will be rendered with XML documentation comments for members if they exist - Defaults to false, expected use cases include things like signature file generation. - - - - - Force the suffix style: int List - - - - - Force the prefix style: List<int> - - - - - Use the IsPrefixDisplay member of the TyCon to determine the style - - - - - Describes how generic type parameters in a type will be formatted during printing - - - - - During backend code generation of state machines, register a template replacement for struct types. - This may introduce new free variables related to the instantiation of the struct type. - - - - - Represents the options to activate when collecting free variables - - - - - Represents a combination of substitutions/instantiations where things replace other things during remapping - - - - - Represents an instantiation where value references replace other value references - - - - - Represents an instantiation where type definition references replace other type definition references - - - - - Represents an instantiation where types replace type parameters - - - - - The empty map - - - - - Make a new map, containing a entries for the given type definitions - - - - - Fetch the entries for the given type definition - - - - - Make a new map, containing a new entry for the given type definition - - - - - Maps TyconRef to list of T based on stamp keys - - - - - Get the entry for the given type definition - - - - - Determine if the map is empty - - - - - The empty map - - - - - Try to find the entry for the given type definition - - - - - Remove the entry for the given type definition, if any - - - - - Make a new map, containing entries for the given type definitions - - - - - Determine is the map contains an entry for the given type definition - - - - - Make a new map, containing a new entry for the given type definition - - - - - Maps TyconRef to T based on stamp keys - - - - - Get the entry for the given type parameter - - - - - The empty map - - - - - Try to find the entry for the given type parameter - - - - - Determine is the map contains an entry for the given type parameter - - - - - Make a new map, containing a new entry for the given type parameter - - - - - Maps type parameters to entries based on stamp keys - - - - - Maps Val's to list of T based on stamp keys - - - - - Mutable data structure mapping Val's to T based on stamp keys - - - - - Maps Val to T, based on stamps - - - - - GeneralizedType (generalizedTypars, tauTy) - - generalizedTypars -- the truly generalized type parameters - tauTy -- the body of the generalized type. A 'tau' type is one with its type parameters stripped off. - - - - - Finish the targets - - - - - Build the overall expression - - - - - Add a new destination target - - - - - Add a new destination target that is an expression result - - - - - Create a new builder - - - - - Build decision trees imperatively - - - - - Check if the order of defined typars is different from the order of used typars in the curried arguments. - If this is the case, a generated signature would require explicit typars. - See https://github.com/dotnet/fsharp/issues/15175 - - - - - Updates the IsPrefixDisplay to false for the Microsoft.FSharp.Collections.seq`1 entity - Meant to be called with the FSharp.Core module spec right after it was unpickled. - - - - - Serialize an entity to a very basic json structure. - - - - - Add an System.Runtime.CompilerServices.ExtensionAttribute to the Entity if found via predicate and not already present. - - - - - Matches a ModuleOrNamespaceContents that is empty from a signature printing point of view. - Signatures printed via the typed tree in NicePrint don't print TMDefOpens or TMDefDo. - This will match anything that does not have any types or bindings. - - - - - Get the key associated with the member constraint. - - - - - Get the name of the trait for textual call. - - - - - Get the argument types when the trait is used as a first-class value "^T.TraitName" which can then be applied - - - - - Get the argument types recorded in the member constraint suitable for building a TypedTree call. - - - - - Indicates if an F# type is the type associated with an F# exception declaration - - - - - Detect a 'seq { ... }' expression - - - - - Detect a 'Seq.empty' implicit in the implied 'else' branch of an 'if .. then' in a seq { ... } - - - - - Detect the outer 'Seq.delay' added for a construct 'seq { ... }' - - - - - Detect the de-sugared form of a 'for x in collection do ..' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'use x = ..' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'try .. finally .. ' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'while gd do expr' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'expr; expr' within a 'seq { ... }' - - - - - Detect the de-sugared form of a 'yield x' within a 'seq { ... }' - - - - - Determine if a value is a method implementing an interface dispatch slot using a private method impl - - - - - Match an if...then...else expression or the result of "a && b" or "a || b" - - - - - Shared helper for binding attributes - - - - - The delegate type ResumableCode, or any function returning this a delegate type - - - - - Any delegate type with ResumableCode attribute, or any function returning such a delegate type - - - - - Add a label to use as the target for a goto - - - - - Recognise a try-finally expression - - - - - Recognise a try-with expression - - - - - Recognise an integer for-loop expression - - - - - Recognise a while expression - - - - - Recognise a '__resumeAt' expression - - - - - Recognise a '__debugPoint' expression - - - - - Recognise a sequential or binding construct in a resumable code - - - - - Recognise a '__stateMachine' expression - - - - - Recognise a 'match __resumableEntry() with ...' expression - - - - - Match 'if __useResumableCode then ... else ...' expressions - - - - - Match a .Invoke on a delegate - - - - - Match expressions that represent the creation of an instance of an F# delegate value - - - - - Match expressions that are an application of a particular F# function value - - - - - Create an empty immutable mapping from witnesses to some data - - - - - Determines types that are potentially known to satisfy the 'comparable' constraint and returns - a set of residual types that must also satisfy the constraint - - - - - Get the overall type for a function that implements the active pattern - - - - - Get the result type for the active pattern - - - - - Get the display name for one of the cases of the active pattern, by index - - - - - Get the core of the display name for one of the cases of the active pattern, by index - - - - - Build for loops - - - - - Check if the type is a byref-like but not a byref. - - - - - returns Some(assemblyName) for success - - - - - Try to find the AttributeUsage attribute, looking for the value of the AllowMultiple named parameter - - - - - Try to find an attribute with a specific full name on a type definition - - - - - Try to find a specific attribute on a type definition - - - - - Try to find a specific attribute on a type definition, where the attribute accepts a bool argument. - - - - - Try to find a specific attribute on a type definition, where the attribute accepts a string argument. - - This is used to detect the 'DefaultMemberAttribute' and 'ConditionalAttribute' attributes (on type definitions) - - - - - Use an operator as a witness - - - - - Use a witness in BuiltInWitnesses - - - - - Make a call to the 'isprintf' function for string interpolation - - - - - This is used for tacking on code _after_ the expression. The SuppressStmt - setting is used for debug points, suppressing the debug points for the statement if possible. - - - - - This is used for tacking on code _before_ the expression. The SuppressStmt - setting is used for debug points, suppressing the debug points for the statement if possible. - - - - - Create the expression 'None' for an option-type - - - - - Create the expression 'Some(expr)' - - - - - Create the expression 'headExpr:: tailExpr' - - - - - Create the expression '[]' for a list type - - - - - Create the struct union case 'Some' or 'ValueSome(expr)' for a voption type - - - - - Create the struct union case 'ValueSome(expr)' for a voption type - - - - - Create the union case 'Some(expr)' for an option type - - - - - Create the union case 'None' for an option type - - - - - Create the Nullable type for a given element type - - - - - Create the voption type for a given element type - - - - - Create the option type for a given element type - - - - - Create the list type for a given element type - - - - - Create the IEnumerator type for a given element type - - - - - Create the IEnumerable (seq) type for a given element type - - - - - Create the FSharpRef type for a given element type - - - - - Get the element type of an FSharpRef type - - - - - Check if a type is an FSharpRef type - - - - - Matches any byref type, yielding the target type - - - - - An active pattern to transform System.Nullable types to their input, otherwise leave the input unchanged - - - - - An active pattern to match System.Nullable types - - - - - An active pattern to determine if a type is a nominal type, possibly instantiated - - - - - For "type Class as self", 'self' is fixed up after initialization. To support this, - it is converted behind the scenes to a ref. This function strips off the ref and - returns the underlying type. - - - - - Determine if a type is a struct, record or union type - - - - - Determine if a type is a numeric type type - - - - - Determine if a type is a non-decimal numeric type type - - - - - Determine if a type is a decimal type - - - - - Determine if a type is a floating point type - - - - - Determine if a type is an integer type - - - - - Determine if a type is an unsigned integer type - - - - - Determine if a type is a signed integer type - - - - - Determine if a type is an enum type - - - - - Determine if a type is a class type - - - - - Determine if a type is an unmanaged type - - - - - Determine if a type is a variable type with the ': not struct' constraint. - - Note, isRefTy does not include type parameters with the ': not struct' constraint - This predicate is used to detect those type parameters. - - - - - Determine if a type is a variable type with the ': struct' constraint. - - Note, isStructTy does not include type parameters with the ': struct' constraint - This predicate is used to detect those type parameters. - - - - - Determine if a type is a struct type - - - - - Determine if TyconRef is to a struct type - - - - - If the input type is an enum type, then convert to its underlying type, otherwise return the input type - - - - - Determine the underlying type of an enum type (normally int32) - - - - - Determine if a type is a ComInterop type - - - - - Determine if a type is a sealed type - - - - - Determine if a type is a function (including generic). Not the same as isFunTy. - - - - - Determine if a type is a FSharpRef type - - - - - Determine if a type is an interface type - - - - - Determine if a type is a delegate type defined in F# - - - - - Determine if a type is a delegate type - - - - - Determine if a reference to a type definition is an interface type - - - - - Get the rank of an array type - - - - - Get the element type of an array type - - - - - Determine if a type is the System.Void type - - - - - Determine if a type is the System.ValueType type - - - - - Determine if a type is the System.Object type - - - - - Determine if a type is the F# unit type - - - - - Determine the rank of one of the artificial type definitions used for array types - - - - - Check if a type definition is one of the artificial type definitions used for array types of different ranks - - - - - Build an array type of the given rank - - - - - Get the element type of an F# list type - - - - - Get the element type of an array type - - - - - Determine if a type is a single-dimensional array type - - - - - Determine if a type is any kind of array type - - - - - Determine if a type is a nominal .NET type - - - - - Determine if a type is an F# list type - - - - - Determine if a type is the System.String type - - - - - Extract metadata from a type - - - - - Extract metadata from a type definition - - - - - Build an PrintFormat type - - - - - Build an Lazy type - - - - - Build an IObserver type - - - - - Build an IObservable type - - - - - Build an IEvent type - - - - - Take apart an IDelegateEvent type - - - - - Determine if a type is an IDelegateEvent type - - - - - Try to take apart a System.Linq.Expression type - - - - - Take apart a System.Linq.Expression type - - - - - Determine if a type is a System.Linq.Expression type - - - - - Take apart a System.Nullable type - - - - - Try to take apart a System.Nullable type - - - - - Determine is a type is a System.Nullable type - - - - - Try to take apart an option type - - - - - Try to take apart an option type - - - - - Take apart an option type - - - - - Determine if a type is an option type - - - - - Determine if a type is a value option type - - - - - Build a single-dimensional array type - - - - - Build a 'voidptr' type - - - - - Build a nativeptr type - - - - - Fold over all the expressions in an expression - - - - - Fold over all the expressions in an implementation file - - - - - The empty set of actions for folding over expressions - - - - - Combine two static-resolution requirements on a type parameter - - - - - Make a delegate invoke expression for an F# delegate type, doing beta reduction by introducing let-bindings - if the delegate expression is a construction of a delegate. - - - - - Make an application expression, doing beta reduction by introducing let-bindings - if the function expression is a construction of a lambda - - - - - Given a lambda expression, adjust it to have be one or two lambda expressions (fun a -> (fun b -> ...)) - where the first has the given arguments. - - - - - Given a lambda expression taking multiple variables, build a corresponding lambda taking a tuple - - - - - Work out what things on the right-han-side of a 'let rec' recursive binding need to be fixed up - - - - - Make a 'match' expression without applying any peep-hole optimizations. - - - - - Make a 'match' expression applying some peep-hole optimizations along the way, e.g to - pre-decide the branch taken at compile-time. - - - - - Accumulate the targets actually used in a decision graph (for reporting warnings) - - - - - Build an expression representing the read of an instance class or record field. - First take the address of the record expression if it is a struct. - - - - - Build an expression to take the address of a local - &localv - - - - - Build an expression to dereference a local pointer - *localv_ptr - - - - - Build an expression to mutate the contents of a local pointer - *localv_ptr = e - - - - - Build an expression to mutate a local - localv <- e - - - - - Build the application of a generic construct to a set of type arguments. - Reduce the application via substitution if the function value is a typed lambda expression. - - - - - Build the application of a (possibly generic, possibly curried) function value to a set of type and expression arguments. - Reduce the application via let-bindings if the function value is a lambda expression. - - - - - Build the application of a (possibly generic, possibly curried) function value to a set of type and expression arguments - - - - - Adjust marks in expressions, replacing all marks by the given mark. - Used when inlining. - - - - - Determine if a record field is hidden by a signature - - - - - Determine if a member, function or value is hidden by a signature - - - - - Determine if the representation of a type definition is hidden by a signature - - - - - Determine if a type definition is hidden by a signature - - - - - Make a remapping table for viewing a module or namespace 'from the outside' - - - - - Make the substitution (remapping) table for viewing a module or namespace 'from the outside' - - Given the top-most signatures constrains 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. - - - - - Given a value definition, try to produce a reference to that value. Fails for local values. - - - - - Given a namespace, module or type definition, try to produce a reference to that entity. - - - - - Wrap one module or namespace definition in a 'module M = ..' outer wrapper - - - - - Wrap one module or namespace definition in a 'namespace N' outer wrapper - - - - - Wrap one module or namespace implementation in a 'namespace N' outer wrapper - - - - - Compute the hiding information that corresponds to the hiding applied at an assembly boundary - - - - - Compute the hiding information that corresponds to the hiding applied at an assembly boundary - - - - - Compute the remapping information implied by an explicit signature being given for an inferred signature - - - - - Compute the remapping information implied by a signature being inferred for a particular implementation - - - - - Instantiate the generic type parameters in an expression, building a new one - - - - - Instantiate the generic type parameters in a method slot signature, building a new one - - - - - Copy a method slot signature, including new generic type parameters if the slot signature represents a generic method - - - - - Copy an entire implementation file using the given copying flags - - - - - Copy an entire expression using the given copying flags - - - - - Copy an entire module or namespace type using the given copying flags - - - - - Remap a (possible generic) type using the given remapping substitution - - - - - Remap an attribute using the given remapping substitution - - - - - Remap an expression using the given remapping substitution - - - - - Remap a reference to a value using the given remapping substitution - - - - - Remap a reference to a record field using the given remapping substitution - - - - - Remap a reference to a union case using the given remapping substitution - - - - - Remap a reference to a type definition using the given remapping substitution - - - - - Mutate a value to indicate it should be considered a local rather than a module-bound definition - - - - - Given a lambda binding, extract the ValReprInfo for its arguments and other details - - - - - Given a lambda expression, extract the ValReprInfo for its arguments and other details - - - - - Given a (curried) lambda expression, pull off its arguments - - - - - Compute the type of an expression from the expression itself - - - - - Check if a set of free variables are all public - - - - - Check if a set of free type variables are all public - - - - - Get the free variables in the right hand side of a binding. - - - - - Get the free variables in an expression. - - - - - Get the free variables in a module definition. - - - - - A unique qualified name for each type definition, used to qualify the names of interface implementation methods - - - - - Return the full text for an item as we want it displayed to the user as a fully qualified entity - - - - - Count the number of type parameters on the enclosing type - - - - - Returns (parentTypars,memberParentTypars,memberMethodTypars,memberToParentInst,tinst) - - - - - Returns (parentTypars,memberParentTypars,memberMethodTypars,memberToParentInst,tinst) - - - - - Returns (parentTypars,memberParentTypars,memberMethodTypars,memberToParentInst,tinst) - - - - - Try to get a TyconRef for a type without erasing type abbreviations - - - - - See through F# exception abbreviations - - - - - set bool to 'true' to allow shortcutting of type parameter equation chains during stripping - - - - - From typars to types - - - - - Equality for value references - - - - - Equality for type definition references - - - - - An ordering for type parameters, based on stamp - - - - - An ordering for record fields, based on stamp - - - - - An ordering for type definitions, based on stamp - - - - - An ordering for value definitions, based on stamp - - - - - 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. - - - - - Helper to take the address of an expression - - - - - Helper to create an expression that dereferences an address. - - - - - If it is a tuple type, ensure it's outermost type is a .NET tuple type, otherwise leave unchanged - - - - - Evaluate the AnonRecdTypeInfo to work out if it is a struct or a ref. - - - - - Evaluate the TupInfo to work out if it is a struct or a ref. Currently this is very simple - but TupInfo may later be used carry variables that infer structness. - - - - - Make a TAST expression representing getting an item fromm a tuple - - - - - Convert from F# tuple creation expression to .NET tuple creation expressions - - - - - Convert from F# tuple types to .NET tuple types. - - - - - Get a TyconRef for a .NET tuple type - - - - - Check if a TyconRef is for a .NET tuple type. Currently this includes Tuple`1 even though - that' not really part of the target set of TyconRef used to represent F# tuples. - - - - - The number of fields in the largest tuple before we start encoding, i.e. 7 - - - - - The largest tuple before we start encoding, i.e. 7 - - - - - Make an expression that gets the address of an element in an array - - - - - Make an expression that sets an instance field in an F# exception value - - - - - Make an expression that gets an instance field from an F# exception value - - - - - Like mkUnionCaseFieldGetUnprovenViaExprAddr, but for struct-unions, the input should be a copy of the expression. - - - - - Build a 'TOp.UnionCaseFieldSet' expression. For ref-unions, the input expression has 'TType_ucase', which is - an F# compiler internal "type" corresponding to the union case. For struct-unions, - the input should be the address of the expression. - - - - - Build a 'TOp.UnionCaseFieldGetAddr' expression for a field of a union when we've already determined the value to be a particular union case. For ref-unions, - the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, - the input should be the address of the expression. - - - - - Build a 'TOp.UnionCaseFieldGetAddr' expression for a field of a union when we've already determined the value to be a particular union case. For ref-unions, - the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, - the input should be the address of the expression. - - - - - Build a 'TOp.UnionCaseFieldGet' expression for something we've already determined to be a particular union case. For ref-unions, - the input expression has 'TType_ucase', which is an F# compiler internal "type" corresponding to the union case. For struct-unions, - the input should be the address of the expression. - - - - - Make a 'TOp.UnionCaseProof' expression, which proves a union value is over a particular case (used only for ref-unions, not struct-unions) - - - - - Make an expression that gets the tag of a union value (via the address of the value if it is a struct) - - - - - Make an expression that sets an instance the field of a record or class (via the address of the value if it is a struct) - - - - - Make an expression that gets the address of a static field in a record or class - - - - - Make an expression that sets a static field in a record or class - - - - - Make an expression that gets a static field from a record or class - - - - - Make an expression that gets the address of an instance field from a record or class (via the address of the value if it is a struct) - - - - - Make an expression that gets an instance field from a record or class (via the address of the value if it is a struct) - - - - - Make an expression that gets an item from an anonymous record (via the address of the value if it is a struct) - - - - - Make an expression that gets an item from an anonymous record - - - - - Make an expression that gets an item from a tuple - - - - - Make an expression that re-raises an exception via a library call - - - - - Make an expression that re-raises an exception - - - - - Make an expression that coerces one expression to another type - - - - - Make an expression that is IL assembly code - - - - - Make an expression that constructs an exception value - - - - - Make an expression that constructs a union case, e.g. 'Some(expr)' - - - - - Make an out-byref type with an out kind parameter - - - - - Make a in-byref type with a in kind parameter - - - - - Make a byref type with a in/out kind inference parameter - - - - - Make a byref type - - - - - Make the expression corresponding to 'expr1 || expr2' - - - - - Make the expression corresponding to 'expr1 && expr2' - - - - - Test if the type parameter is one of those being generalized by a type scheme. - - - - - Make the right-hand side of a generalized binding, incorporating the generalized generic parameters from the type - scheme into the right-hand side as type generalizations. - - - - - Make a let-rec expression that locally binds values to expressions where self-reference back to the values is possible. - - - - - Make a set of bindings that bind values to expressions in an "invisible" way. - Invisible bindings are not given a sequence point and should not have side effects. - - - - - Make a binding that binds a value to an expression in an "invisible" way. - Invisible bindings are not given a sequence point and should not have side effects. - - - - - Make a let-expression that locally binds a value to an expression in an "invisible" way. - Invisible bindings are not given a sequence point and should not have side effects. - - - - - Make a let-expression that locally binds a compiler-generated value to an expression, where the expression - is returned by the given continuation. Compiler-generated bindings do not give rise to a sequence point in debugging. - - - - - Make a let-expression that locally binds a compiler-generated value to an expression. - Compiler-generated bindings do not give rise to a sequence point in debugging. - - - - - Make a set of bindings that bind compiler generated values to corresponding expressions. - Compiler-generated bindings do not give rise to a sequence point in debugging. - - - - - Make a binding that binds a function value to a lambda taking multiple arguments - - - - - Build a user-level let expression - - - - - Build a user-level value sequence of let bindings - - - - - Build a user-level value sequence of let bindings - - - - - Build a user-level let-binding - - - - - Build a user-level value binding - - - - - Build a 'try/finally' expression - - - - - Build a 'try/with' expression - - - - - Build a 'for' loop expression - - - - - Build a 'while' loop expression - - - - - Build a lambda expression that corresponds to the implementation of a member - - - - - Build an iterated generic (type abstraction + tupled+curried) lambda expression - - - - - Build an iterated (tupled+curried) lambda expression - - - - - Build an iterated (curried) lambda expression - - - - - Build an type-chose expression, indicating that a local free choice of a type variable - - - - - Build an object expression - - - - - Build a generic lambda expression (type abstraction) - - - - - Build a lambda expression taking a single value - - - - - Rebuild a lambda during an expression tree traversal - - - - - Build a lambda expression taking multiple values - - - - - Make a new mutable compiler-generated local value, 'let' bind it to an expression - 'invisibly' (no sequence point etc.), and build an expression to reference it - - - - - Make a new mutable compiler-generated local value and build an expression to reference it - - - - - Make a new compiler-generated local value and build an expression to reference it - - - - - Make a new local value and build an expression to reference it - - - - - Build an expression corresponding to the use of a reference to a value - - - - - Build an expression corresponding to the use of a value - Note: try to use exprForValRef or the expression returned from mkLocal instead of this. - - - - - Build an if-then statement - - - - - Build a conditional expression that checks for non-nullness - - - - - Build a conditional expression - - - - - Build a conditional expression - - - - - Add an if-then-else boolean conditional node into a decision tree - - - - - Look for a use of an F# value, possibly including application of a generic thing to a set of type arguments - - - - - Get the values for a set of bindings - - - - - Match any 'Expr.Link' and 'Expr.DebugPoint' in an expression, providing the inner expression and a function to rebuild debug points - - - - - Ignore 'Expr.Link' and 'Expr.DebugPoint' in an expression - - - - - Ignore 'Expr.Link' in an expression - - - - - Module publication, used while compiling fslib. - - - - - Get the curried type corresponding to a lambda - - - - - Get the type corresponding to a lambda - - - - - Get the natural type of a single argument amongst a set of curried arguments - - - - - Build a curried function type - - - - - Build a type-forall anonymous generic type if necessary - - - - - Build a function type - - - - - Reduce a type to its more canonical form subject to an erasure flag, inference equations and abbreviations - - - - - Get the unit of measure for an annotated type - - - - - Check the equivalence of two units-of-measure - - - - - Check the equivalence of two types - - - - - Check the equivalence of two types up to an erasure flag - - - - - An exception representing a warning for a defensive copy of an immutable struct - - - - - Debug layout for class and record fields - - - - - Debug layout for a list of implementation files - - - - - Debug layout for an implementation file - - - - - Debug layout for a decision tree - - - - - Debug layout for a type definition - - - - - Debug layout for an expression - - - - - Debug layout for a binding of an expression to a value - - - - - Debug layout for a module or namespace definition - - - - - Debug layout for a method slot signature - - - - - Debug layout for a type - - - - - Debug layout for a set of type parameters - - - - - Debug layout for a type parameter - - - - - Debug layout for a trait constraint - - - - - Debug layout for a type parameter definition - - - - - Debug layout for a value definition - - - - - Debug layout for an integer - - - - - Debug layout for an value definition at its binding site - - - - - Debug layout for a reference to a union case - - - - - Debug layout for a reference to a value - - - - - Convert an expression to a string for debugging purposes - - - - - Convert a type to a string for debugging purposes - - - - - A global flag indicating whether debug output should include type information - - - - - A global flag indicating whether debug output should include ranges - - - - - A global flag indicating whether debug output should include stamps of Val and Entity - - - - - A global flag indicating whether debug output should include ValReprInfo - - - - - Layout for internal compiler debugging purposes - - - - - Utilities used in simplifying types for visual presentation - - - - - same as PrettifyTypes, but allows passing the types along with a discriminant value - useful to prettify many types that need to be sorted out after prettifying operation - took place. - - - - - Assign previously generated pretty names to typars - - - - - Defines derived expression manipulation and construction functions. - - - - - A function to read a value from a given state - - - - - The type of state unpicklers read from - - - - - A function to pickle a value into a given stateful writer - - - - - The type of state written to by picklers - - - - - The assumptions that need to be fixed up - - - - - The data that uses a collection of CcuThunks internally - - - - - Like Fixup but loader may return None, in which case there is no fixup. - - - - - Represents deserialized data with a dangling set of CCU fixup thunks indexed by name - - - - - Deserialize an arbitrary object which may have holes referring to other compilation units - - - - - Deserialize a TAST description of a compilation unit - - - - - Deserialize a TAST type - - - - - Deserialize a TAST expression - - - - - Deserialize a TAST union case reference - - - - - Deserialize a TAST type reference - - - - - Deserialize a TAST value reference - - - - - Deserialize a TAST constant - - - - - Deserialize a namemap - - - - - Deserialize an array of values - - - - - Deserialize a tuple - - - - - Deserialize a tuple - - - - - Deserialize a tuple - - - - - Deserialize a lazy value (eagerly) - - - - - Deserialize a string - - - - - Deserialize an integer - - - - - Deserialize a bool - - - - - Deserialize a byte - - - - - Serialize an arbitrary object using the given pickler - - - - - Serialize a TAST description of a compilation unit - - - - - Serialize a TAST type - - - - - Serialize a TAST expression - - - - - Serialize a TAST union case reference - - - - - Serialize a TAST type or entity reference - - - - - Serialize a TAST value reference - - - - - Serialize a TAST constant - - - - - Serialize a namemap of data - - - - - Serialize an array of data - - - - - Serialize a tuple of data - - - - - Serialize a tuple of data - - - - - Serialize a tuple of data - - - - - Serialize a lazy value (eagerly) - - - - - Serialize a string - - - - - Serialize an integer - - - - - Serialize a boolean value - - - - - Serialize a byte - - - - - Defines the framework for serializing and de-serializing TAST data structures as binary blobs for the F# metadata format. - - - - - The Typars of a Val in the signature data should also be pretty named. - This will happen for the implementation file contents, but not for the signature data. - In this module some helpers will traverse the ModuleOrNamespaceType and update all the typars of each found Val. - - - - - The TcGlobals for the import context - - - - - The AssemblyLoader for the import context - - - - - Represents a context used for converting AbstractIL .NET and provided types to F# internal compiler data structures. - Also cache the conversion of AbstractIL ILTypeRef nodes, based on hashes of these. - - There is normally only one ImportMap for any assembly compilation, though additional instances can be created - using tcImports.GetImportMap() if needed, and it is not harmful if multiple instances are used. The object - serves as an interface through to the tables stored in the primary TcImports structures defined in CompileOps.fs. - - - - - Record a root for a [<Generate>] type to help guide static linking & type relocation - - - - - Get a flag indicating if an assembly is a provided assembly, plus the - table of information recording remappings from type names in the provided assembly to type - names in the statically linked, embedded assembly. - - - - - Resolve an Abstract IL assembly reference to a Ccu - - - - - Represents an interface to some of the functionality of TcImports, for loading assemblies - and accessing information about generated provided assemblies. - - - - - Import an IL type as an F# type, first rescoping to view the metadata from the current assembly - being compiled. importInst gives the context for interpreting type variables. - - - - - Import the type forwarder table for an IL assembly - - - - - Import an IL assembly as a new TAST CCU - - - - - Import a set of Abstract IL generic parameter specifications as a list of new F# generic parameters. - - - - - Import a provided method reference as an Abstract IL method reference - - - - - Import a provided type as an AbstractIL type - - - - - Import a provided type reference as an F# type TyconRef - - - - - Import a provided type as an F# type. - - - - - Pre-check for ability to import an IL type as an F# type. - - - - - Import an IL type as an F# type. - - - - - Pre-check for ability to import a reference to a type definition, given an AbstractIL ILTypeRef, with caching - - - - - Import a reference to a type definition, given an AbstractIL ILTypeRef, with caching - - - - - Functions to import .NET binary metadata as TAST objects - - - - - Indicates whether we should visit multiple instantiations of the same generic interface or not - - - - - Indicates whether we can skip interface types that lie outside the reference set - - - - - 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<A :> List<B>, B :> List<A>> ... - - - - - 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. ty.M<_>) then we may be both substituting the - instantiation associated with 'ty' as well as copying the type parameters associated with - M and instantiating their constraints - - Note: this now looks identical to constraint instantiation. - - - - - Get the return type of an IL method, taking into account instantiations for type, return attributes and method generic parameters, and - translating 'void' to 'None'. - - - - - Get the parameter type of an IL method. - - - - - Read an Abstract IL type from metadata, including any attributes that may affect the type itself, and convert to an F# type. - - - - - Read an Abstract IL type from metadata and convert to an F# type. - - - - - Check if a type exists somewhere in the hierarchy which has the given head type. - - - - - Check if a type exists somewhere in the hierarchy which has the same head type as the given type (note, the given type need not have a head type at all) - - - - - Check if a type has a particular head type - - - - - Check if two types have the same nominal head type - - - - - Get all interfaces of a type, including the type itself if it is an interface - - - - - Get all super types of the type, including the type itself - - - - - Search for one element where a function returns a 'Some' result, following interfaces - - - - - Search for one element satisfying a predicate, following interfaces - - - - - Iterate, following interfaces. Skipping interfaces that lie outside the referenced assembly set is allowed. - - - - - Fold, following interfaces. Skipping interfaces that lie outside the referenced assembly set is allowed. - - - - - Fold, do not follow interfaces (unless the type is itself an interface) - - - - - Collect the set of immediate declared interface types for an F# type, but do not - traverse the type hierarchy to collect further interfaces. - - - - - Get the base type of a type, taking into account type instantiations. Return None if the - type has no base type. - - - - - Represents the information about the compiled form of a method signature. Used when analyzing implementation - relations between members and abstract slots. - - - - - An F# use of an event backed by provided metadata - - - - - An F# use of an event backed by .NET metadata - - - - - An F# use of an event backed by F#-declared metadata - - - - - Get the intra-assembly XML documentation for the property. - - - - - Get the TcGlobals associated with the object - - - - - Get the 'remove' method associated with an event - - - - - Indicates if the enclosing type for the event is a value type. - - For an extension event, this indicates if the event extends a struct type. - - - - - Indicates if this property is static. - - - - - Indicates if this is an extension member - - - - - Indicates if this event has an associated XML comment authored in this assembly. - - - - - Get the logical name of the event. - - - - - Get the event name in core DisplayName form (no backticks or parens added) - - - - - Get the display name of the event. - - Backticks and parens are added implicitly for non-identifiers. - - - - - Get the declaring type or module holding the method. - Note that C#-style extension properties don't exist in the C# design as yet. - If this is an F#-style extension method it is the logical module - holding the value for the extension method. - - - - - Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - - - - - Get the enclosing type of the event. - - If this is an extension member, then this is the apparent parent, i.e. the type the event appears to extend. - - - - - Get the enclosing type of the method info, using a nominal type for tuple types - - - - - Get the 'add' method associated with an event - - - - - Get the delegate type associated with the event. - - - - - Get custom attributes for events (only applicable for IL events) - - - - - Test whether two event infos have the same underlying definition. - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Calculates a hash code of event info (similar as previous) - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Describes an F# use of an event - - - - - Get the declaring type of the event as an ILTypeRef - - - - - Get the ILMethInfo describing the 'remove' method associated with the event - - - - - Get the raw Abstract IL metadata for the event - - - - - Indicates if the property is static - - - - - Get the declaring IL type of the event as an ILTypeInfo - - - - - Get the name of the event - - - - - Get the enclosing ("parent"/"declaring") type of the field. - - - - - Get the ILMethInfo describing the 'add' method associated with the event - - - - - Describes an F# use of an event backed by Abstract IL metadata - - - - - An F# use of a property backed by provided metadata - - - - - An F# use of a property backed by Abstract IL metadata - - - - - An F# use of a property backed by F#-declared metadata - - - - - Get the intra-assembly XML documentation for the property. - - - - - Get the TcGlobals associated with the object - - - - - Get a MethInfo for the 'setter' method associated with the property - - - - - Get the logical name of the property. - - - - - True if the getter (or, if absent, the setter) is a virtual method - - - - - Indicates if the enclosing type for the property is a value type. - - For an extension property, this indicates if the property extends a struct type. - - - - - Indicates if this property is static. - - - - - Indidcates whether IL property has an init-only setter (i.e. has the `System.Runtime.CompilerServices.IsExternalInit` modifer) - - - - - Is the property requied (has the RequiredMemberAttribute). - - - - - Indicates if the property is logically a 'newslot', i.e. hides any previous slots of the same name. - - - - - Indicates if this property is an indexer property, i.e. a property with arguments. - - - - - Indicates if this is an F# property compiled as a CLI event, e.g. a [<CLIEvent>] property. - - - - - Indicates if this is an extension member - - - - - Indicates if the getter (or, if absent, the setter) for the property is a dispatch slot. - - - - - Indicates if this property is marked 'override' and thus definitely overrides another property. - - - - - Indicates if this property has an associated setter method. - - - - - Indicates if this property has an associated getter method. - - - - - Indicates if this property has an associated XML comment authored in this assembly. - - - - - Get the property name in core DisplayName form (no backticks or parens added) - - - - - Get the display name of the property. - - Backticks and parens are added implicitly for non-identifiers. - - - - - Get the declaring type or module holding the method. - Note that C#-style extension properties don't exist in the C# design as yet. - If this is an F#-style extension method it is the logical module - holding the value for the extension method. - - - - - Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - - - - - Get the enclosing type of the property. - - If this is an extension member, then this is the apparent parent, i.e. the type the property appears to extend. - - - - - Get the enclosing type of the method info, using a nominal type for tuple types - - - - - Test whether two property infos have the same underlying definition. - Uses the same techniques as 'MethInfosUseIdenticalDefinitions'. - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Get the result type of the property - - - - - Get the types of the indexer parameters associated with the property - - - - - Get the names and types of the indexer parameters associated with the property - - If the property is in a generic type, then the type parameters are instantiated in the types returned. - - - - - Get the details of the indexer parameters associated with the property - - - - - Return a new property info where there is no associated setter, only an associated getter. - - Property infos can combine getters and setters, assuming they are consistent w.r.t. 'virtual', indexer argument types etc. - When checking consistency we split these apart - - - - - Return a new property info where there is no associated getter, only an associated setter. - - Property infos can combine getters and setters, assuming they are consistent w.r.t. 'virtual', indexer argument types etc. - When checking consistency we split these apart - - - - - Calculates a hash code of property info. Must be compatible with ItemsAreEffectivelyEqual relation. - - - - - Describes an F# use of a property - - - - - Get the TcGlobals governing this value - - - - - Gets the ILMethInfo of the 'set' method for the IL property - - - - - Get the raw Abstract IL metadata for the IL property - - - - - Get the name of the IL property - - - - - Indicates if the IL property is virtual - - - - - Indicates if the IL property is static - - - - - Is the property requied (has the RequiredMemberAttribute). - - - - - Indicates if the IL property is logically a 'newslot', i.e. hides any previous slots of the same name. - - - - - Get the declaring IL type of the IL property, including any generic instantiation - - - - - Indicates if the IL property has a 'set' method - - - - - Indicates if the IL property has a 'get' method - - - - - Gets the ILMethInfo of the 'get' method for the IL property - - - - - Get the apparent declaring type of the method as an F# type. - If this is a C#-style extension method then this is the type which the method - appears to extend. This may be a variable type. - - - - - Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type - - - - - Get the return type of the IL property. - - Any type parameters of the enclosing type are instantiated in the type returned. - - - - - Get the types of the indexer arguments associated with the IL property. - - Any type parameters of the enclosing type are instantiated in the type returned. - - - - - Get the names and types of the indexer arguments associated with the IL property. - - Any type parameters of the enclosing type are instantiated in the type returned. - - - - - Describes an F# use of a property backed by Abstract IL metadata - - - - - Get a reference to the F# metadata for the uninstantiated union case - - - - - Get the F# metadata for the uninstantiated union case - - - - - Get the list of types for the instantiation of the type parameters of the declaring type of the union case - - - - - Get a reference to the F# metadata for the declaring union type - - - - - Get the F# metadata for the declaring union type - - - - - Get the logical name of the union case. - - - - - Get the core of the display name of the union case - - Backticks and parens are not added for non-identifiers. - - Note logical names op_Nil and op_ColonColon become [] and :: respectively. - - - - - Get the display name of the union case - - Backticks and parens are added implicitly for non-identifiers. - - Note logical names op_Nil and op_ColonColon become ([]) and (::) respectively. - - - - - Get the instantiation of the type parameters of the declaring type of the union case - - - - - Describes an F# use of a union case - - - - - Get the generic instantiation of the declaring type of the field - - - - - Get a reference to the F# metadata for the F#-declared record, class or struct type - - - - - Get the F# metadata for the F#-declared record, class or struct type - - - - - Get a reference to the F# metadata for the uninstantiated field - - - - - Get the F# metadata for the uninstantiated field - - - - - Get the logical name of the field in an F#-declared record, class or struct type - - - - - Indicate if the field is a literal field in an F#-declared record, class or struct type - - - - - Indicate if the field is a static field in an F#-declared record, class or struct type - - - - - Get the (instantiated) type of the field in an F#-declared record, class or struct type - - - - - Get the name of the field, same as LogicalName - Note: no double-backticks added for non-identifiers - - - - - Get the name of the field, with double-backticks added if necessary - - - - - Get the enclosing (declaring) type of the field in an F#-declared record, class or struct type - - - - - Describes an F# use of a field in an F#-declared record, class or struct type - - - - - Represents a single use of a field backed by provided metadata - - - - - Represents a single use of a field backed by Abstract IL metadata - - - - - Get the type instantiation of the declaring type of the field - - - - - Get the scope used to interpret IL metadata - - - - - Indicates if the field is a literal field with an associated literal value - - - - - Indicates if the field is a member of a struct or enum type - - - - - Indicates if the field is static - - - - - Indicates if the field has the 'specialname' property in the .NET IL - - - - - Indicates if the field is readonly (in the .NET/C# sense of readonly) - - - - - Get a reference to the declaring type of the field as an ILTypeRef - - - - - Get the type of the field as an IL type - - - - - Get an (uninstantiated) reference to the field as an Abstract IL ILFieldRef - - - - - Get the name of the field - - - - - Get the core of the display name for the field. This is the same as the logical name. - - - - - Get the enclosing ("parent"/"declaring") type of the field. - - - - - Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type - - - - - Tests whether two infos have the same underlying definition. - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Get the type of the field as an F# type - - - - - Calculates a hash code of field info. Must be compatible with ItemsAreEffectivelyEqual relation. - - - - - Represents a single use of a IL or provided field from one point in an F# program - - - - - Describes a use of a method backed by provided metadata - - - - - Describes a use of a pseudo-method corresponding to the default constructor for a .NET struct type - - - - - Describes a use of a method backed by Abstract IL # metadata - - - - - Describes a use of a method declared in F# code and backed by F# metadata. - - - - - Get the XML documentation associated with the method - - - - - Get the TcGlobals value that governs the method declaration - - - - - Get the information about provided static parameters, if any - - - - - Get a list of argument-number counts, one count for each set of curried arguments. - - For an extension member, drop the 'this' argument. - - - - - Get the method name in LogicalName form, i.e. the name as it would be stored in .NET metadata - - - - - Indicates if the enclosing type for the method is a value type. - - For an extension method, this indicates if the method extends a struct type. - - - - - Indicates if this method is read-only; usually by the [<IsReadOnly>] attribute. - Must be an instance method. - Receiver must be a struct type. - - - - - Indicates if this method takes no arguments - - - - - Does the method appear to the user as an instance method? - - - - - Indicates if this is an IL method. - - - - - Indicates if this is an F#-style extension member. - - - - - Check if this method is an explicit implementation of an interface member - - - - - Indicates if this method is a generated method associated with an F# CLIEvent property compiled as a .NET event - - - - - Indicates if this is an extension member. - - - - - Check if this method is marked 'override' and thus definitely overrides another method. - - - - - Indicates if this is an C#-style extension member. - - - - - Indicates, wheter this method has `IsExternalInit` modreq. - - - - - Indicates if this is a method defined in this assembly with an internal XML comment - - - - - Get the number of generic method parameters for a method. - For an extension method this includes all type parameters, even if it is extending a generic type. - - - - - Get the formal generic method parameters for the method as a list of type variables. - - For an extension method this includes all type parameters, even if it is extending a generic type. - - - - - Get the formal generic method parameters for the method as a list of variable types. - - - - - Get the extension method priority of the method, if it has one. - - - - - Get the extension method priority of the method. If it is not an extension method - then use the highest possible value since non-extension methods always take priority - over extension members. - - - - - Get the method name in core DisplayName form (no backticks or parens added) - - - - - Get the method name in DisplayName form - - - - - Get the actual type instantiation of the declaring type associated with this use of the method. - - For extension members this is empty (the instantiation of the declaring type). - - - - - Get the declaring type or module holding the method. If this is an C#-style extension method then this is the type - holding the static member that is the extension method. If this is an F#-style extension method it is the logical module - holding the value for the extension method. - - - - - Get the method name in DebuggerDisplayForm - - - - - Try to get an arbitrary F# ValRef associated with the member. This is to determine if the member is virtual, amongst other things. - - - - - Get the enclosing type of the method info. - - If this is an extension member, then this is the apparent parent, i.e. the type the method appears to extend. - This may be a variable type. - - - - - Get the enclosing type of the method info, using a nominal type for tuple types - - - - - Tries to get the object arg type if it's a byref type. - - - - - Indicates if this is an extension member (e.g. on a struct) that takes a byref arg - - - - - Tests whether two method infos have the same underlying definition. - Used to merge operator overloads collected from left and right of an operator constraint. - - Compatible with ItemsAreEffectivelyEqual relation. - - - - - Indicates if this method is an extension member that is read-only. - An extension member is considered read-only if the first argument is a read-only byref (inref) type. - - - - - Apply a type instantiation to a method info, i.e. apply the instantiation to the enclosing type. - - - - - Get the ParamData objects for the parameters of a MethInfo - - - - - Get the signature of an abstract method slot. - - - - - Get the parameter types of a method info - - - - - Get the parameter names of a MethInfo - - - - - Get the ParamData objects for the parameters of a MethInfo - - - - - Get the parameter attributes of a method info, which get combined with the parameter names and types - - - - - Get the (zero or one) 'self'/'this'/'object' arguments associated with a method. - An instance method returns one object argument. - - - - - Select all the type parameters of the declaring type of a method. - - For extension methods, no type parameters are returned, because all the - type parameters are part of the apparent type, rather the - declaring type, even for extension methods extending generic types. - - - - - Get the return type of a method info, where 'void' is returned as 'unit' - - - - - Get custom attributes for method (only applicable for IL methods) - - - - - Get the return type of a method info, where 'void' is returned as 'None' - - - - - Build IL method infos. - - - - - Build IL method infos for a C#-style extension method - - - - - Calculates a hash code of method info. Compatible with ItemsAreEffectivelyEqual relation. - - - - - Add the actual type instantiation of the apparent type of an F# extension method. - - - - - Describes an F# use of a method - - - - - Get the Abstract IL metadata associated with the method. - - - - - Get the Abstract IL metadata corresponding to the parameters of the method. - If this is an C#-style extension method then drop the object argument. - - - - - Get the number of parameters of the method - - - - - Get the Abstract IL scope information associated with interpreting the Abstract IL metadata that backs this method. - - - - - Indicates if the IL method is marked virtual. - - - - - Does it appear to the user as a static method? - - - - - Indicates if the method has protected accessibility, - - - - - Does it have the .NET IL 'newslot' flag set, and is also a virtual? - - - - - Does it appear to the user as an instance method? - - - - - Indicates if the method is an extension method - - - - - Indicates if the IL method is marked final. - - - - - Indicates if the method is a constructor - - - - - Indicates if the method is a class initializer. - - - - - Indicates if the IL method is marked abstract. - - - - - Get the IL name of the method - - - - - Get a reference to the method (dropping all generic instantiations), as an Abstract IL ILMethodRef. - - - - - Get the declaring type associated with an extension member, if any. - - - - - Get the formal method type parameters associated with a method. - - - - - Get the instantiation of the declaring type of the method. - If this is an C#-style extension method then this is empty because extension members - are never in generic classes. - - - - - Get the declaring type of the method. If this is an C#-style extension method then this is the IL type - holding the static member that is the extension method. - - - - - Get the apparent declaring type of the method as an F# type. - If this is a C#-style extension method then this is the type which the method - appears to extend. This may be a variable type. - - - - - Like ApparentEnclosingType but use the compiled nominal type if this is a method on a tuple type - - - - - Indicates if the method is marked with the [<IsReadOnly>] attribute. This is done by looking at the IL custom attributes on - the method. - - - - - Indicates if the method is marked as a DllImport (a PInvoke). This is done by looking at the IL custom attributes on - the method. - - - - - Get all the argument types of the IL method. Include the object argument even if this is - an C#-style extension method. - - - - - Get the argument types of the the IL method. If this is an C#-style extension method - then drop the object argument. - - - - - Get info about the arguments of the IL method. If this is an C#-style extension method then - drop the object argument. - - Any type parameters of the enclosing type are instantiated in the type returned. - - - - - Get the (zero or one) 'self'/'this'/'object' arguments associated with an IL method. - An instance extension method returns one object argument. - - - - - Get the F# view of the return type of the method, where 'void' is 'unit'. - - - - - Get the compiled return type of the method, where 'void' is None. - - - - - Describes an F# use of an IL method. - - - - - Get the compiled nominal type. In the case of tuple types, this is a .NET tuple type - - - - - Describes an F# use of an IL type, including the type instantiation associated with the type at a particular usage point. - - - - - Full information about a parameter returned for use by the type checker and language service. - - - - - Partial information about a parameter returned for use by the Language Service - - - - - The argument is optional, and is a caller-side .NET optional or default arg. - Note this is correctly termed caller side, even though the default value is optically specified on the callee: - in fact the default value is read from the metadata and passed explicitly to the callee on the caller side. - - - - - The argument is optional, and is an F# callee-side optional arg - - - - - The argument is not optional - - - - - Compute the OptionalArgInfo for an IL parameter - - This includes the Visual Basic rules for IDispatchConstant and IUnknownConstant and optional arguments. - - - - - Represents information about a parameter indicating if it is optional. - - - - - The caller-side value for the optional arg, if any - - - - - Describes the sequence order of the introduction of an extension method. Extension methods that are introduced - later through 'open' get priority in overload resolution. - - - - - Used to hide/filter members from super classes based on signature - - - - - Used to hide/filter members from base classes based on signature - - - - - Used to hide/filter members from super classes based on signature - - - - - Used to hide/filter members from super classes based on signature - Inref and outref parameter types will be treated as a byref type for equivalency. - - - - - Inref and outref parameter types will be treated as a byref type for equivalency. - - - - - Get the information about the compiled form of a method signature. Used when analyzing implementation - relations between members and abstract slots. - - - - - Strips inref and outref to be a byref. - - - - - Find the delegate type that an F# event property implements by looking through the type hierarchy of the type of the property - for the first instantiation of IDelegateEvent. - - - - - Create an error object to raise should an event not have the shape expected by the .NET idiom described further below - - - - - Construct the data representing the signature of an abstract method slot - - - - - Construct the data representing a parameter in the signature of an abstract method slot - - - - - The slotsig returned by methInfo.GetSlotSig 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 - - - - - Get the return type of a provided method, where 'void' is returned as 'None' - - - - - Check if an F#-declared member value is an explicit interface member implementation - - - - - Check if an F#-declared member value is an 'override' or explicit member implementation - - - - - Check if an F#-declared member value is a dispatch slot - - - - - Check if an F#-declared member value is a virtual method - - - - - Indicates if an F#-declared function or member value is a CLIEvent property compiled as a .NET event - - - - - An exception type used to raise an error using the old error system. - - Error text: "A definition to be compiled as a .NET event does not have the expected form. Only property members can be compiled as .NET events." - - - - - An AccessorDomain which returns all items - - - - - An AccessorDomain which returns everything but .NET private/internal items. - This is used - - when solving member trait constraints, which are solved independently of accessibility - - for failure paths in error reporting, e.g. to produce an error that an F# item is not accessible - - an adhoc use in service.fs to look up a delegate signature - - - - - An AccessorDomain which returns public items - - - - - cpaths: indicates we have the keys to access any members private to the given paths - tyconRefOpt: indicates we have the keys to access any protected members of the super types of 'TyconRef' - - - - - Represents the 'keys' a particular piece of code can use to access other constructs?. - - - - - Compute the accessibility of a provided member - - - - - Indicate if a provided member is accessible - - - - - Indicates if a type is accessible (both definition and instantiation) - - - - - Check that a type definition and its representation contents are accessible - - - - - Indicates if a type definition and its representation contents are accessible - - - - - Check that an entity is accessible - - - - - Indicates if an entity is accessible - - - - - Indicates if an F# item is accessible - - - - - The basic logic of private/internal/protected/InternalsVisibleTo/public accessibility - - - - - Logic associated with checking "ObsoleteAttribute" and other attributes - on items from name resolution - - - - - "Single Feasible Type" inference - Look for the unique supertype of ty2 for which ty2 :> ty1 might feasibly hold - - - - - Adjust a lambda expression to match the argument counts expected in the ValReprInfo - - - - - Break apart lambdas according to a given expected ValReprInfo that the lambda implements. - - - - - Break apart lambdas according to a given expected ValReprInfo that the lambda implements. - - - - - Choose solutions for Expr.TyChoose 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<'T>". - - - - - The feasible coercion relation. Part of the language spec. - - - - - The feasible equivalence relation after stripping Measures. - - - - - The feasible equivalence relation. Part of the language spec. - - - - - The feasible equivalence relation. Part of the language spec. - - - - - Implements a :> b without coercion based on finalized (no type variable) types - - - - - Primary relations on types and signatures, with the exception of - constraint solving and method overload resolution. - - - - - Represents information about the delegate - the Invoke MethInfo, the delegate argument types, the delegate return type - and the overall F# function type for the function type associated with a .NET delegate type - - - - - Try and find a record or class field for a type. - - - - - Perform type-directed name resolution of a particular named member in an F# type - - - - - Check if the given language feature is supported by the runtime. - - - - - Determine if a type has a static abstract method with the given name somewhere in its hierarchy - - - - - Get the trait infos for a type variable (empty for everything else) - - - - - Read the record or class fields of a type, including inherited ones. Cache the result for monomorphic types. - - - - - Read the raw method sets of a type, including inherited ones. Cache the result for monomorphic types - - - - - Get the super-types of a type, excluding interface types. - - - - - Get the flattened list of intrinsic properties in the hierarchy - - - - - Get the sets of intrinsic properties in the hierarchy (not including extension properties) - - - - - Get the flattened list of intrinsic methods in the hierarchy - - - - - Get the sets of intrinsic methods in the hierarchy (not including extension methods) - - - - - Read the IL fields of a type, including inherited ones. Cache the result for monomorphic types. - - - - - Read the events of a type, including inherited ones. Cache the result for monomorphic types. - - - - - Get the super-types of a type, including interface types. - - - - - Find the op_Implicit for a type - - - - - Exclude properties from super types which have the same name as a property in a more specific type. - - - - - Exclude methods from super types which have the same signature as a method in a more specific type. - - - - - Get the declared IL fields of a type, not including inherited fields - - - - - An InfoReader is an object to help us read and cache infos. - We create one of these for each file we typecheck. - - - - - Similar to "IgnoreOverrides", but filters the items bottom-to-top, - and discards all when finds first non-virtual member which hides one above it in hirearchy. - - - - - Get overrides instead of abstract slots when measuring whether a class/interface implements all its required slots. - - - - - Prefer items toward the top of the hierarchy, which we do if the items are virtual - but not when resolving base calls. - - - - - Indicates if we prefer overrides or abstract slots. - - - - - Sets of methods up the hierarchy, ignoring duplicates by name and sig. - Used to collect sets of virtual methods, protected methods, protected - properties etc. - - - - - A helper type to help collect properties. - - Join up getters and setters which are not associated in the F# data structure - - - - - Try to find the xml doc associated with the assembly name and metadata key - - - - - Try to find the name of the metadata file for this external definition - - - - - Indicates if an event info is associated with a delegate type that is a "standard" .NET delegate type - with a sender parameter. - - - - - Try and interpret a delegate type as a "standard" .NET delegate type associated with an event, with a "sender" parameter. - - - - - 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. - - - - - Get a set of most specific override methods. - - - - - Try to find a particular named property on a type. Only used to ensure that local 'let' definitions and property names - are distinct, a somewhat adhoc check in tc.fs. - - - - - Try to detect the existence of a method on a type. - - - - - Perform type-directed name resolution of a particular named member in an F# type - - - - - Get the flattened list of intrinsic properties in the hierarchy - - - - - Get the flattened list of intrinsic methods in the hierarchy - - - - - Get the sets intrinsic properties in the hierarchy (not including extension properties) - - - - - Get the sets of intrinsic methods in the hierarchy (not including extension methods) - - - - - Exclude properties from super types which have the same name as a property in a more specific type. - - - - - Exclude methods from super types which have the same signature as a method in a more specific type. - - - - - Get the declared constructors of any F# type - - - - - From the given method sets, filter each set down to the most specific ones. - - - - - Get the items that are considered the most specific in the hierarchy out of the given items by type. - - - - - Checks whether the given type has an indexer property. - - - - - Query the immediate properties of an F# type, not taking into account inherited properties. The optFilter - parameter is an optional name to restrict the set of properties returned. - - - - - Query the immediate methods of an F# type, not taking into account inherited methods. The optFilter - parameter is an optional name to restrict the set of properties returned. - - - - - Try to select an F# value when querying members, and if so return a MethInfo that wraps the F# value. - - - - - Select members from a type by name, searching the type hierarchy if needed - - - - - Convert a MethInfo to a F# signature - - - - - Print Signatures/Types, for signatures, intellisense, quick info, FSI responses - - - - - This predicate can be used once type inference is complete, before then it is an approximation - that doesn't assert any new constraints - - - - - Generate the hash/compare functions we add to user-defined types by default. - - - - - Notify the sink of the information needed to complete recording a use of a symbol - for the purposes of the language service. One of the callbacks should be called by - the checker. - - The first callback represents a case where we have learned the type - instantiation of a generic method or value. - - The second represents the case where we have resolved overloading and/or - a specific override. The 'Item option' contains the candidate overrides. - - - - - Notification is not needed - - - - - Specifies extra work to do after overload resolution - - - - - Indicates whether we permit a direct reference to a type generator. Only set when resolving the - right-hand-side of a [<Generate>] declaration. - - - - - Indicates if a warning should be given for the use of upper-case identifiers in patterns - - - - - Indicates resolution within an expression, either A.B.C (static) or expr.A.B.C (instance) and - whether we should filter content according to instance/static characteristic. - - - - - Indicates the kind of lookup being performed. Note, this type should be made private to nameres.fs. - - - - - Indicates if a lookup requires a match on the instance/static characteristic. - - This is not supplied at all lookup sites - in theory it could be, but currently diagnostics on many paths - rely on returning all the content and then filtering it later for instance/static characteristic. - - When applied, this also currently doesn't filter all content - it is currently only applied to filter out extension methods - that have a static/instance mismatch. - - - - - Indicates if we only need one result or all possible results from a resolution. - - - - - An abstract type for reporting the results of name resolution and type checking, and which allows - temporary suspension and/or redirection of reporting. - - - - - Get all the uses of all symbols reported to the sink - - - - - Get all the resolutions reported to the sink - - - - - Get all open declarations reported to the sink - - - - - Get the format specifier locations - - - - - Create a TcResultsSinkImpl - - - - - An implementation of ITypecheckResultsSink to collect information during type checking - - - - - Cached line-end normalized source text and an array of line end positions, used for format string parsing - - - - - Get the current source - - - - - Record that an open declaration occured in a given scope range - - - - - Record that a name resolution occurred at a specific location in the source - - - - - Record that a method group name resolution occurred at a specific location in the source - - - - - Record that a printf format specifier occurred at a specific location in the source - - - - - Record that an expression has a specific type at the given range. - - - - - Record that an environment is active over the given scope range - - - - - An abstract type for reporting the results of name resolution and type checking - - - - - Array of line start positions - - - - - Source text - - - - - Source text and an array of line end positions, used for format string parsing - - - - - Empty collection of symbol uses - - - - - All the uses of all items within the file - - - - - Get all the uses of a particular item within the file - - - - - Get the locations of all the printf format specifiers in the file - - - - - Represents container for all name resolutions that were met so far when typechecking some particular file - - - - - Represents the empty set of resolutions - - - - - Exact name resolutions - - - - - Represents additional resolutions of names to groups of methods. - CapturedNameResolutions should be checked when no captured method group is found. - See TypeCheckInfo.GetCapturedNameResolutions for example. - - - - - Information of exact types found for expressions, that can be to the left of a dot. - typ - the inferred type for an expression - - - - - Name resolution environments for every interesting region in the file. These regions may - overlap, in which case the smallest region applicable should be used. - - - - - The starting and ending position - - - - - line and column - - - - - Naming environment--for example, currently open namespaces. - - - - - The active instantiation for any generic type parameters - - - - - Information about the occurrence of the symbol - - - - - Named item - - - - - Information about printing. For example, should redundant keywords be hidden? - - - - - The access rights of code at the location - - - - - Represents the kind of the occurrence when reporting a name in name resolution - - - - - Represents information which guides name resolution of types. - - - - - Indicates definite knowledge of empty type arguments, i.e. the logical equivalent of name< > - - - - - Deduce definite knowledge of type arguments - - - - - Represents information about the generic argument count of a type name when resolving it. - - In some situations we resolve "List" to any type definition with that name regardless of the number - of generic arguments. In others, we know precisely how many generic arguments are needed. - - - - - Indicates we are resolving type names to type definitions - - - - - Indicates we are resolving type names to constructor methods. - - - - - Indicates whether we are resolving type names to type definitions or to constructor methods. - - - - - A flag which indicates if it is an error to have two declared type parameters with identical names - in the name resolution environment. - - - - - Indicates whether an identifier (single or long) is followed by an extra dot. Typically used - to provide better tooling and error reporting. - - - - - Typars (always available by unqualified names). Further typars can be - in the tpenv, a structure folded through each top-level definition. - - - - - Other extension members unindexed by type - - - - - Extension members by type and name - - - - - Tycons available by unqualified, demangled names (i.e. (List,1) --> TyconRef) - - - - - Tycons available by unqualified, demangled names (i.e. (List,1) --> TyconRef) - - - - - Tycons indexed by the various names that may be used to access them, e.g. - "List" --> multiple TyconRef's for the various tycons accessible by this name. - "List`1" --> TyconRef - - - - - Record or unions that may have type instantiations associated with them - when record labels or union cases are used in an unqualified context. - - - - - 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 - - - - - Fully qualified modules and namespaces. 'open' does not change this. - - - - - 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. - - - - - Data Tags and Active Pattern Tags available by unqualified name - - - - - Enclosing type instantiations that are associated with an unqualified type item - - - - - Values and Data Tags available by unqualified name - - - - - Display environment information for output - - - - - The environment of information used to resolve names - - - - - ILExtMem(declaringTyconRef, ilMetadata, pri) - - IL-style extension member, backed by some kind of method with an [<Extension>] attribute - - - - - F#-style Extrinsic extension member, defined in F# code - - - - - Describes the sequence order of the introduction of an extension method. Extension methods that are introduced - later through 'open' get priority in overload resolution. - - - - - Information about an extension member held in the name resolution environment - - - - - Represents a record field resolution and the information if the usage is deprecated. - - - - - Pairs an Item with a TyparInstantiation showing how generic type variables of the item are instantiated at - a particular usage point. - - - - - Represents the potential resolution of an unqualified name to a type. - - - - - Represents the resolution of a name to a named property setter - - - - - Represents the resolution of a name to a named argument - - - - - Represents the resolution of a name to an operator - - - - - Represents the resolution of a name to a module or namespace - - - - - Represents the resolution of a name to a type variable - - - - - Represents the resolution of a name to a custom builder in the F# computation expression syntax - - - - - CustomOperation(nm, helpText, methInfo) - - Used to indicate the availability or resolution of a custom query operation such as 'sortBy' or 'where' in computation expression syntax - - - - - Represents the resolution of a name to a group of types - - - - - Represents the resolution of a name to a delegate - - - - - Represents the resolution of a name to the fake constructor simulated for an interface type. - - - - - Represents the resolution of a name to a constructor - - - - - Represents the resolution of a name to a group of methods. - - - - - Represents the resolution of a name to a property - - - - - Represents the resolution of a name to an event - - - - - Represents the resolution of a name to a .NET field - - - - - Represents the resolution of a name at the point of its own definition. - - - - - Represents the resolution of a name to a field of an anonymous record type. - - - - - Represents the resolution of a name to a union case field. - - - - - Represents the resolution of a name to an F# trait - - - - - Represents the resolution of a name to an F# record or exception field. - - - - - Represents the resolution of a name to an F# exception definition. - - - - - Represents the resolution of a name to an F# active pattern case within the body of an active pattern. - - - - - Represents the resolution of a name to an F# active pattern result. - - - - - Represents the resolution of a name to an F# union case. - - - - - Represents the resolution of a name to an F# value or function. - - - - - The text for the item to use in the declaration list. - This does not include backticks, parens etc. - - Note: here "Core" means "without added backticks or parens" - - - - - The full text for the item to show in error messages and to use in code. - This includes backticks, parens etc. - - - - - Represents an item that results from name resolution - - - - - The named argument is a static parameter to a provided type. - - - - - The named argument is an argument of a method - - - - - Represents the item with which a named argument is associated. - - - - - A NameResolver is a context for name resolution. It primarily holds an InfoReader. - - - - - Resolve a (possibly incomplete) long identifier to a set of possible resolutions, qualified by type. - - - - - Resolve a (possibly incomplete) long identifier to a set of possible resolutions. - - - - - Try to resolve a long identifier as type. - - - - - A generator of type instantiations used when no more specific type instantiation is known. - - - - - Resolve a long identifier occurring in an expression position, qualified by a type. - - - - - Resolve a long identifier occurring in an expression position. - - - - - Return the fields for the given class or record - - - - - Resolve a (possibly incomplete) long identifier to a loist of possible class or record fields - - - - - Resolve a long identifier occurring in an expression position - - - - - Resolve a long identifier to a nested field - - - - - Resolve a long identifier to a field - - - - - Resolve a long identifier to a type definition - - - - - Resolve a long identifier representing a type name - - - - - Resolve a long identifier when used in a pattern. - - - - - Resolve a long identifier using type-qualified name resolution. - - - - - Resolve a long identifier to an object constructor. - - - - - Resolve a long identifier to a namespace, module. - - - - - Generate a new reference to a record field with a fresh type instantiation - - - - - Get the available methods of a type (both declared and inherited) - - - - - Get all the available properties of a type (only extension) - - - - - Get all the available properties of a type (both intrinsic and extension) - - - - - Report an open declaration - - - - - Report a specific name resolution at a source range - - - - - Report a specific name resolution at a source range, replacing any previous resolutions - - - - - Report a specific method group name resolution at a source range - - - - - Report a specific name resolution at a source range - - - - - Report the active name resolution environment for a source range - - - - - Temporarily suspend reporting of name resolution and type checking results - - - - - Temporarily redirect reporting of name resolution and type checking results - - - - - Hash compatible with ItemsAreEffectivelyEqual - - - - - Check for equality, up to signature matching - - - - - Qualified lookup of type names in the environment - - - - - Add some declared type parameters to the name resolution environment - - - - - Add the content of a type to the name resolution environment - - - - - Add a list of modules or namespaces to the name resolution environment - - - - - Add a single modules or namespace to the name resolution environment - - - - - Add a list of module or namespace to the name resolution environment, including any sub-modules marked 'AutoOpen' - - - - - Add a module abbreviation to the name resolution environment - - - - - Add an F# exception definition to the name resolution environment - - - - - Add a list of type definitions to the name resolution environment - - - - - Add active pattern result tags to the environment. - - - - - Add a single F# value to the environment. - - - - - Add some extra items to the environment for Visual Studio, e.g. record members - - - - - Add extra items to the environment for Visual Studio, e.g. static members - - - - - Find a field in anonymous record type - - - - - Get the active pattern elements defined in a module, if any. Cache in the slot in the module type. - - - - - Used to report a warning condition for the use of upper-case identifiers in patterns - - - - - Used to report an error condition where name resolution failed due to an indeterminate type - - - - - Check the names add up between a signature and its implementation. We check this first. - - - - - Primary relations on types and signatures, with the exception of - constraint solving and method overload resolution. - - - - - A slot that *might* have ambiguity due to multiple inheritance; happens with default interface implementations. - - - - - Gets the method info. - - - - - Indicates a slot which does not have to be implemented, because an inherited implementation is available. - - - - - Indicates a slot which has a default interface implementation. - A combination of this flag and the lack of IsOptional means the slot may have been reabstracted. - - - - - The overall information about a method implementation in a class or object expression - - - - - Get the properties relevant to determining 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 - - - - - Get the methods relevant to determining 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 - - - - - "Type Completion" inference and a few other checks at the end of the inference scope - - - - - Get the slots of a type that can or must be implemented. - - - - - Check all implementations implement some dispatch slot. - - - - - Check all dispatch slots are implemented by some override. - - - - - Check if an override exactly matches the requirements for a dispatch slot. - - - - - Get the override information for an object expression method being used to implement dispatch slots - - - - - Format the signature of a MethInfo as a string as part of an error message - - - - - Format the signature of an override as a string as part of an error message - - - - - Primary logic related to method overrides. - - - - - Unnamed called out args: return these as part of the return tuple - - - - - Unnamed called optional args: pass defaults for these - - - - - Unassigned args - - - - - The method we're attempting to call - - - - - The formal instantiation of the method we're attempting to call - - - - - The types of the actual object arguments, if any - - - - - The instantiation of the method we're attempting to call - - - - - The generic instantiation of the method we're attempting to call - - - - - Return type after tupling of out args is taken into account - - - - - The return type after implicit deference of byref returns is taken into account - - - - - Args assigned to specify values for attribute fields and properties (these are not necessarily "property sets") - - - - - The property related to the method we're attempting to call, if any - - - - - Named setters - - - - - The argument analysis for each set of curried arguments - - - - - Represents the syntactic matching between a caller of a method and the called method. - - The constructor takes all the information about the caller and called side of a method, match up named arguments, property setters etc., - and returns a CalledMeth object for further analysis. - - - - - Named args - - - - - Any unnamed caller arguments assigned to a "param array" argument - - - - - The called "ParamArray" argument, if any - - - - - Any unnamed caller arguments not otherwise assigned - - - - - The called arguments corresponding to "unnamed" arguments - - - - - Indicates whether a type directed conversion (e.g. int32 to int64, or op_Implicit) - has been used in F# code - - - - - Represents the list of unnamed / named arguments at method call site - remark: The usage of list list is due to tupling and currying of arguments, - stemming from SynValInfo in the AST. - - - - - Represents the resolution of a caller argument as a named-setter argument - - - - - Represents the possibilities for a named-setter argument (a property, field, or a record field setter) - - - - - The argument on the caller side - - - - - The called argument in the method - - - - - The identifier for a named argument, if any - - - - - Represents a match between a caller argument and a called argument, arising from either - a named argument or an unnamed argument. - - - - - In the following, 'T 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 '?', making the caller argument explicit-optional - - - - - Generate the arguments passed for a set of (solved) traits in non-generic code - - - - - Generate a lambda expression for the given solved trait. - - - - - Generate a witness for the given (solved) constraint. Five possiblilities are taken - into account. - 1. The constraint is solved by a .NET-declared method or an F#-declared method - 2. The constraint is solved by an F# record field - 3. The constraint is solved by an F# anonymous record field - 4. The constraint is considered solved by a "built in" solution - 5. The constraint is solved by a closed expression given by a provided method from a type provider - - In each case an expression is returned where the method is applied to the given arguments, or the - field is dereferenced. - - None is returned in the cases where the trait has not been solved (e.g. is part of generic code) - or there is an unexpected mismatch of some kind. - - - - - Build the argument list for a method call. Adjust for param array, 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. - - - - - Implements the elaborated form of adhoc conversions from functions to delegates at member callsites - - - - - Build a call to the System.Object constructor taking no arguments, - - - - - 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. - - - - - Make a call to a method info. Used by the optimizer and code generator to build - calls to the type-directed solutions to member constraints. - - - - - Is this a 'base' call - - - - - F# supports some adhoc conversions to make expression fit known overall type - - - - - F# supports some adhoc conversions to make expression fit known overall type - - - - - Performs a set of constraint solver operations returning TypeDirectedConversionUsed and - combines their results. - - - - - Performs a set of constraint solver operations returning TypeDirectedConversionUsed and - combines their results. - - - - - Logic associated with resolving method calls. - - - - - Represents the typechecked, elaborated form of a pattern, prior to pattern-match compilation. - - - - - What should the decision tree contain for any incomplete match? - - - - - Compile a pattern into a decision tree and a set of targets. - - - - - Add a post-inference check to run at the end of inference - - - - - Get the post-inference checks to run near the end of inference, but before defaults are applied - - - - - Get the post-inference checks to run at the end of inference - - - - - A function that denotes captured tcVal, Used in constraint solver and elsewhere to get appropriate expressions for a ValRef. - - - - - Each branch of the expression must convert to the type indicated - - - - - Each branch of the expression must have the type indicated - - - - - Represents a point where no subsumption/widening is possible - - - - - Represents known information prior to checking an expression or pattern, e.g. it's expected type - - - - - Cases for overload resolution failure that exists in the implementation of the compiler. - - - - - Captures relevant information for a particular failed overload resolution. - - - - - The type equation comes from a sequence expression. - - - - - The type equation comes from a pattern match guard. - - - - - The type equation comes from a return type of a pattern match clause (not the first clause). - - - - - The type equation comes from an downcast where a upcast could be used. - - - - - The type equation comes from a runtime type test. - - - - - The type equation comes from a yield in a computation expression. - - - - - The type equation comes from a return in a computation expression. - - - - - The type equation comes from a list or array constructor - - - - - The type equation comes from the verification of a tuple in record fields. - - - - - The type equation comes from the verification of record fields. - - - - - The type equation comes from a type check of the result of an else branch. - - - - - The type equation comes from an omitted else branch. - - - - - The type equation comes from an IF expression. - - - - - No context was given. - - - - - Information about the context of a type equation. - - - - - For some code like "let f() = ([] = [])", a free choice is made for a type parameter - for an interior type variable. This chooses a solution for a type parameter subject - to its constraints and applies that solution by using a constraint. - - - - - Generate the lambda argument passed for a use of a generic construct that accepts trait witnesses - - - - - Generate the arguments passed when using a generic construct that accepts traits witnesses - - - - - Determine if a codegen witness for a trait will require witness args to be available, e.g. in generic code - - - - - Generate a witness expression if none is otherwise available, e.g. in legacy non-witness-passing code - - - - - Remove the global constraints related to generalized type variables - - - - - Re-assess the staticness of the type parameters - - - - - The entry point to resolve the overloading for an entire call - - - - - Given a method, which may be generic, make new inference type variables for - its generic parameters, and ensure that the constraints the new type variables are adjusted. - - Returns the inference type variables as a list of types. - - - - - Given a set of type parameters, make new inference type variables for - each and ensure that the constraints on the new type variables are adjusted. - - Returns the inference type variables as a list of types. - - - - - Given a set of type parameters, make new inference type variables for - each and ensure that the constraints on the new type variables are adjusted. - - Returns - 1. the new type parameters - 2. the instantiation mapping old type parameters to inference variables - 3. the inference type variables as a list of types. - - - - - Given a set of formal type parameters and their constraints, make new inference type variables for - each and ensure that the constraints on the new type variables are adjusted to refer to these. - - Returns - 1. the new type parameters - 2. the instantiation mapping old type parameters to inference variables - 3. the inference type variables as a list of types. - - - - - Create a list of inference type variables, one for each element in the input list - - - - - Create an inference type variable representing an error condition when checking a measure - - - - - Create an inference type variable representing an error condition when checking an expression - - - - - Create an inference type variable for the kind of a byref pointer - - - - - Create an inference type variable - - - - - Create a type variable representing the use of a "_" in F# code - - - - - Solves constraints using a mutable constraint-solver state - - - - - 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. - - - - - Find all unsolved inference variables after type inference for an entire file - - - - - Indicates that type references are emitted as integer indexes into a supplied table - - - - - Indicates that witness parameters are recorded - - - - - Convert quoted TAST data structures to structures ready for pickling - - - - - Perform the checks on the TAST for a file after type inference is complete. - - - - - The combinations of limits which apply. - - - - - The scope of this Limit, i.e. "to which scope can a Val safely escape?". - Some values are not allowed to escape their scope. - For example, a top-level function is allowed to return a byref type, but inner functions are not. - This `scope` field is the information that lets us track that. - (Recall that in general scopes are counted starting from 0 indicating the top-level scope, and - increasing by 1 essentially for every nested `let`-binding, method, or module.) - - Some specific values which are often used: - * the value 0 is used in NoLimit and other situations which don't limit where the Val can escape; - * the value 1 is a "top-level local scope", allowing us to express the restriction "this cannot appear - at the top level" (for example, `let x = &y` cannot appear at the top level). - - - - - A "limit" here is some combination of restrictions on a Val. - - - - - Construct a Limit which expresses "this Val must obey the first Limit and the second Limit simultaneously". - - - - - Indicates that no limit applies to some Val. It can appear at the top level or within a `let`-binding, - and the Val does not have any byref- or span-related restrictions. - - - - - It's unlikely you want to use this module except within - PostInferenceChecks. It's exposed to allow testing. - - - - - Implements a set of checks on the TAST for a file that can only be performed after type inference - is complete. - - - - - Perform the TailCall analysis on the optimized TAST for a file. - The TAST is traversed analogously to the PostInferenceChecks phase. - For functions that are annotated with the [<TailCall>] attribute, a warning is emmitted if they are called in a - non-tailrecursive manner in the recursive scope of the function. - The ModuleOrNamespaceContents aren't mutated in any way by performing this check. - - - - - A cache for ArgReprInfos which get created multiple times for the same values - Since they need to be later mutated with updates from signature files this should make sure - we're always dealing with the same instance and the updates don't get lost - - - - - The set of active conditional defines. The value is None when conditional erasure is disabled in tooling. - - - - - Used to resolve names - - - - - Used to read and cache information about types and members - - - - - Used to generate names - - - - - Does this .fs file have a .fsi file? - - - - - Is this a .fsi file? - - - - - Are we compiling the signature of a module from fslib? - - - - - Holds the current inference constraints - - - - - Holds a reference to the component being compiled. - This field is very rarely used (mainly when fixing up forward references to fslib. - - - - - Used to generate new syntactic argument names in post-parse syntactic processing - - - - - Environment needed to convert IL types to F# types in the importer. - - - - - Are we in a script? if so relax the reporting of discarded-expression warnings at the top level - - - - - Set to true if this file causes the creation of generated provided types. - - - - - Guard against depth of expression nesting, by moving to new stack when a maximum depth is reached - - - - - 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 - - - - - Represents the compilation environment for typechecking a single file in an assembly. - - - - - Represents the flags passsed to TcPat regarding the binding location - - - - - Represents the context flowed left-to-right through pattern checking - - - - - Translation of patterns is split 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. - - - - - Represents the results of the first phase of preparing simple values from a pattern - - - - - Holds the initial ValMemberInfo and other information before it is fully completed - - - - - Represents the ValReprInfo for a value, before the typars are fully inferred - - - - - Indicates whether constraints should be checked when checking syntactic types - - - - - 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 - - - - - Represents the current environment of type variables that have implicit scope - (i.e. are without explicit declaration). - - - - - Here Some tcref indicates we can access protected members in all super types - - - - - Context information for type checker - - - - - Mutable accumulator for the current module type - - - - - Internals under these should be accessible - - - - - This field is computed from other fields, but we amortize the cost of computing it. - - - - - 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. - - - - - Name resolution information - - - - - Represents the type environment at a particular scope. Includes the name - resolution environment, the ungeneralizable items from earlier in the scope - and other information about the scope. - - - - - Represents an item in the environment that may restrict the automatic generalization of later - declarations because it refers to type inference variables. As type inference progresses - these type inference variables may get solved. - - - - - Is the an implicit constructor or an explicit one? - - - - - A handle to the boolean ref cell to hold success of initialized 'this' for 'type X() as x = ...' constructs - - - - - A handle to the ref cell to hold results of 'this' for 'type X() as x = ...' and 'new() as x = ...' constructs - in case 'x' is used in the arguments to the 'inherits' call. - - - - - 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 expr1 in "let x = expr1 in { new ... }" - REVIEW: clean up this rather odd approach ... - - - - - Represents information about object constructors - - - - - Represents information about the initialization field used to check that object constructors - have completed before fields are accessed. - - - - - Represents a recursive binding after it has been both checked and generalized, but - before initialization recursion has been rewritten - - - - - Represents a recursive binding after it has been both checked and generalized and after - the special adjustments for 'as this' class initialization checks have been inserted into members. - - - - - Represents a recursive binding after it has been both checked and generalized - - - - - Represents the usage points of a recursive binding that need later adjustment once the - type of the member of value is fully inferred. - - - - - Represents a recursive binding after it has been checked but prior to generalization - - - - - Represents a recursive binding after it has been normalized but before it has been checked - - - - - Represents a recursive binding after it has been normalized but before it's info has been put together - - - - - Represents the results of the second phase of checking simple values - - - - - Represents the results of the first phase of preparing bindings - - - - - RecursiveBindingInfo - flows through initial steps of TcLetrec - - - - - 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. - - - - - NormalizedBindingRhs records the r.h.s. of a binding after some munging just before type checking. - - - - - The result of checking a value or member signature - - - - - Represents the initial information about a recursive binding - - - - - Indicates if a member binding is an object expression binding - - - - - Indicates whether the position being checked is precisely the r.h.s. of a "'T :> ***" constraint or a similar - places where IWSAM types do not generate a warning - - - - - A binding in an expression - - - - - A binding in an object expression - - - - - A binding in a class - - - - - Extensions to a type in a different assembly - - - - - Extensions to a type within the same assembly - - - - - A binding in a module, or a member - - - - - A flag to represent the sort of bindings are we processing. - - - - - Indicates if member declarations are allowed to be override members. - - - - - Indicates if member declarations are allowed to be abstract members. - - - - - Provides information about the context for a value or member definition. - - - - - Represents information about the module or type in which a member or value is declared. - - - - - The results of applying let-style generalization after type checking. - - - - - Indicates whether a syntactic type is allowed to include new type variables - not declared anywhere, e.g. `let f (x: 'T option) = x.Value` - - - - - The pattern syntax can also represent active pattern arguments. This routine - converts from the pattern syntax to the expression syntax. - - 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. - - - - - Check a long identifier 'Case' or 'Case argsR' that has been resolved to an active pattern case - - - - - Helper used to check both record expressions and record patterns - - - - - Allow the inference of structness from the known type, e.g. - let (x: struct (int * int)) = (3,4) - - - - - Constrain two types to be equal within this type checking context - - - - - Given the declaration of a function or member, complete the processing of its ValReprInfo - once type parameters have been fully inferred via generalization. - - - - - Given the declaration of a function or member, process it to produce the ValReprInfo - giving the names and attributes relevant to arguments and return, but before type - parameters have been fully inferred via generalization. - - - - - Check a specification of a value or member in a signature or an abstract member - - - - - Check a syntactic type (with error recovery) - - - - - Check a syntactic type or unit of measure - - - - - Check a syntactic type - - - - - Check a collection of type parameters declarations - - - - - Check a set of explicitly declared constraints on type parameters - - - - - Check the application of a provided type to static args - - - - - Check a 'nameof' expression - - - - - Check an inheritance expression or other 'new XYZ()' expression - - - - - Part of check a collection of recursive bindings that might include members - - - - - Check a collection of `let rec` bindings - - - - - Get the binding for the implicit safe initialziation check value if it is being used - - - - - Check an individual `let rec` binding - - - - - Check a set of let bindings in a class or module - - - - - Check a pattern being used as a pattern match - - - - - Try to check a syntactic statement and indicate if it's type is not unit without emitting a warning - - - - - Check a linear expression (e.g. a sequence of 'let') in a tail-recursive way - and convert it to a typed tree expression, using the bodyChecker to check the parts - that are not linear. - - - - - Check a syntactic expression and convert it to a typed tree expression - - - - - Check a syntactic statement and convert it to a typed tree expression. - - - - - Process a leaf construct where the actual type of that construct is already pre-known, - and the overall type can be eagerly propagated into the actual type, including pre-calculating - any type-directed conversion. - - - - - Check a syntactic expression and convert it to a typed tree expression. Possibly allow for subsumption flexibility - and insert a coercion if necessary. - - - - - Check a syntactic expression and convert it to a typed tree expression - - - - - Converts 'a..b' to a call to the '(..)' operator in FSharp.Core - Converts 'a..b..c' to a call to the '(.. ..)' operator in FSharp.Core - - - - - Check that 'args' have the correct number of elements for a tuple expression. - If not, use 'tcArgs' to type check the given elements to show - their correct types (if known) in the error message and raise the error - - - - - Check a syntactic expression and convert it to a typed tree expression - - - - - Check a constant value, e.g. a literal - - - - - Check a set of attributes which can only target specific elements - - - - - Check a set of attributes and allow failure because a later phase of type realization - may successfully check the attributes (if the attribute type or its arguments is in the - same recursive group) - - - - - Check a set of attributes - - - - - Check and publish a value specification (in a signature or 'abstract' member) to the - module/namespace type accumulator and return the resulting Val(s). Normally only one - 'Val' results but CLI events may produce both and add_Event and _remove_Event Val. - - - - - Mark a typar as no longer being an inference type variable - - - - - Publish a value definition to the module/namespace type accumulator. - - - - - Publish a type definition to the module/namespace type accumulator. - - - - - Publish a module definition to the module/namespace type accumulator. - - - - - Produce a post-generalization type scheme for a simple type where no type inference generalization - is appplied. - - - - - Return a new environment suitable for processing declarations in the interior of a module definition - given that the accumulator for the module type already exisits. - - - - - Return a new environment suitable for processing declarations in the interior of a module definition - including creating an accumulator for the module type. - - - - - Return a new environment suitable for processing declarations in the interior of a type definition - - - - - Make initial information for a member value - - - - - Make an initial implicit safe initialization value - - - - - Make simple values (which are not recursive nor members) - - - - - Make an initial 'base' value - - - - - Make an initial 'Val' and publish it to the environment and mutable module type accumulator. - - - - - Make the check for safe initialization of a member - - - - - Locate the environment within a particular namespace path, used to process a - 'namespace' declaration. - - - - - Build the full ValReprInfo one type inference is complete. - - - - - Get the "this" variable from the lambda for an instance member binding - - - - - Get the accumulated module/namespace type for the current module/namespace being processed. - - - - - Produce a fresh view of an object type, e.g. 'List<T>' becomes 'List<?>' for new - inference variables with the given rigidity. - - - - - Adjust a recursive binding after generalization - - - - - Process recursive bindings so that initialization is through laziness and is checked. - The bindings may be either plain 'let rec' bindings or mutually recursive nestings of modules and types. - The functions must iterate the actual bindings and process them to the overall result. - - - - - Invoke pattern match compilation - - - - - Get the expression resulting from turning an expression into an enumerable value, e.g. at 'for' loops - - - - - Compute the available access rights and module/entity compilation path for a paricular location in code - - - - - Compute the available access rights from a particular location in code - - - - - Check if the type annotations and inferred type information in a value give a - full and complete generic type for a value. If so, enable generic recursion. - - - - - After inference, view a ValSchem in a canonical way. - - - - - After inference, view a set of declared type parameters in a canonical way. - - - - - Check a super type is valid - - - - - Check the flags on a member definition for consistency - - - - - Check that a member can be included in an interface - - - - - Process a normalized recursive binding and prepare for progressive generalization - - - - - Set the type of a 'Val' after it has been fully inferred. - - - - - Add a list of values to the environment, producing a new environment. Report to the sink. - - - - - Add a value to the environment, producing a new environment - - - - - Add a value to the environment, producing a new environment. Report to the sink. - - - - - Add a list of explicitly declared type variables to the environment, producing a new environment - - - - - Merge together lists of type variables to generalize, keeping canonical order - - - - - Record the entire contents of a module or namespace type as not-generalizable, that is - if any type variables occur free in the module or namespace type (because type inference - is not yet complete), then they can't be generalized. - - - - - An empty environment of type variables with implicit scope - - - - - Take a syntactic binding and do the very first processing step to normalize it. - - - - - The allowed attribute targets for an F# top level 'do' expression - - - - - The allowed attribute targets for an F# module declaration - - - - - The allowed attribute targets for an F# exception declaration - - - - - The allowed attribute targets for an F# type declaration - - - - - The allowed attribute targets for an F# union case declaration - - - - - The allowed attribute targets for an F# field declaration once it's known to be targeting - a field not a property (see useGenuineField) - - - - - The allowed attribute targets for an F# field declaration - - - - - Given an environment, compute the set of type definitions which must appear before - the current location, not after (to prevent use-before-definition of type definitions - via type inference). - - - - - Given an environment, compute the set of trait solutions which must appear before - the current location, not after (to prevent use-before definitiosn and - forward calls via type inference filling in trait solutions). - - - - - Given an environment, compute the set of inference type variables which may not be - generalised, because they appear somewhere in the types of the constructs availabe - in the environment. - - - - - Check a set of simple patterns, e.g. the declarations of parameters for an implicit constructor. - - - - - Represents a single group of bindings in a class with an implicit constructor - - - - - vals represented as fields or members from this point on - - - - - vals mapped to representations - - - - - Indicates the set of field names taken within one incremental class - - - - - Given localRep saying how locals have been represented, e.g. as fields. - Given an expr under a given thisVal context. - - - - - IncrClassReprInfo represents the decisions we make about the representation of 'let' and 'do' bindings in a - type defined with implicit class construction. - - - - - Indicates how is a 'let' bound value in a class with implicit construction is represented in - the TAST ultimately produced by type checking. - - - - - The value representing the 'this' variable within the implicit instance constructor. - - - - - The value representing the 'base' variable within the implicit instance constructor. - - - - - Data indicating if safe-initialization checks need to be inserted for this type. - - - - - The reference cell holding the 'this' parameter within the implicit constructor so it can be referenced in the - arguments passed to the base constructor - - - - - The values representing the arguments to the implicit constructor. - - - - - The type of the implicit constructor, representing as a ValScheme. - - - - - The value representing the implicit constructor. - - - - - Typechecked info for implicit instance constructor and it's arguments - - - - - The name generator used to generate the names of fields etc. within the type. - - - - - The value representing the static implicit constructor. - Lazy to ensure the static ctor value is only published if needed. - - - - - The copy of the type parameters allocated for implicit construction - - - - - The TyconRef for the type being defined - - - - - Typechecked info for implicit static constructor - - - - - Given a set of 'let' bindings (static or not, recursive or not) that make up a class, - generate their initialization expression(s). - - - - The information about the static implicit constructor - The lhs information about the implicit constructor, the call to the super class constructor and whether we should we place a sequence point at the 'inheritedTys call? - The declarations - - Record any unconstrained type parameters generalized for the outer members as "free choices" in the let bindings - - - - - Check and elaborate the "left hand side" of the implicit class construction - syntax. - - - - - Check and elaborate the "left hand side" of the implicit class construction - syntax. - - - - - Optimization information - - - - - For unit testing - - - - - The size after which we don't inline - - - - - size after which we start enforcing splitting sub-expressions to new methods, to avoid hitting .NET IL limitations - - - - - size after which we start chopping methods in two, though only at match targets - - - - - Use multiple threads. - As soon as a given phase for a file has finished, start processing the next phase of the current file and the same phase of the next file. - - - - - Process files sequentially, on a single thread, doing all optimization phases for each file next to each other. - - - - - Indicates the value is only mutable during its initialization and before any access or capture - - - - - Check if an expression has an effect - - - - - Combine optimization infos - - - - - Ensure that 'internal' items are not exported in the optimization info - - - - - Rewrite the module info using the export remapping - - - - - Saving and re-reading optimization information - - - - - Optimize one implementation file in the given environment - - - - - For building optimization environments incrementally - - - - - top of expr toplevel? (true) - - - - - val not defined under lambdas - - - - - v -> recursive? * v list -- the others in the mutual binding - - - - - bound in a decision tree? - - - - - v -> binding repr - - - - - v -> context / APP inst args - - - - - Expands under-applied values of known arity to lambda expressions, and then reduce to bind - any known arguments. The results are later optimized by Optimizer.fs - - - - - 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. - - - - - Detect a 'seq<int>' type - - - - - The construct was not a state machine - - - - - A state machine was recognised and was not compilable and no alternative is available - - - - - A state machine was recognised and was not compilable and an alternative is available - - - - - A state machine was recognised and was compilable - - - - - Analyze a TAST expression to detect the elaborated form of a state machine expression, a special kind - of object expression that uses special code generation constructs. - - - - - Rewrite mutable locals to reference cells across an entire implementation file - - - - - The ILX generator. - - - - - 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 initially - points to stderr. All functions call flush() automatically. - - REVIEW: review if we should just switch to System.Diagnostics - - - - - A utility type provided for completeness - - - - - A utility type provided for completeness - - - - - Decompose a type definition according to its kind. - - - - - Helpers for codegen: scopes for allocating new temporary variables. - - - - - Is the given assembly possibly a primary assembly? - In practice, a primary assembly is an assembly that contains the System.Object type definition - and has no referenced assemblies. - However, we must consider assemblies that forward the System.Object type definition - to be possible primary assemblies. - Therefore, this will return true if the given assembly is the real primary assembly or an assembly that forwards - the System.Object type definition. - Assembly equivalency ignores the version here. - - - - - A table of common references to items in primary assembly (System.Runtime or mscorlib). - If a particular version of System.Runtime.dll has been loaded then you should - reference items from it via an ILGlobals for that specific version built using mkILGlobals. - - - - - e.g. win86 resources, as the exact contents of a .res or .obj file. Must be unlinked manually. - - - - - 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. - - - - - Represents a native resource to be written in an output file - - - - - Represents a native resource to be read from the PE file - - - - - Records whether the entrypoint resides in another module. - - - - - Records the types implemented by this assembly in auxiliary - modules. - - - - - 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. - - - - - This is the ID of the algorithm used for the hashes of auxiliary - files in the assembly. These hashes are stored in the - <c>ILModuleRef.Hash</c> fields of this assembly. These are not - cryptographic hashes: they are simple file hashes. The algorithm - is normally <c>0x00008004</c> indicating the SHA1 hash algorithm. - - - - - The main module of an assembly is a module plus some manifest information. - - - - - Table of resources in a module. - - - - - Read the bytes from a resource local to an assembly. Will fail for non-local resources. - - - - - "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. - - - - - Represents a manifest resource in a different assembly - - - - - Represents a manifest resource in an associated file - - - - - Represents a manifest resource that can be read or written to a PE file - - - - - [Namespace.]Name - - - - - these are only found in the ILExportedTypesAndForwarders table in the manifest - - - - - "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 "ILExportedTypeOrForwarder" - definition. - these are only found in the "Nested" field of ILExportedTypeOrForwarder objects - - - - - Realise the actual full typedef - - - - - Represents a prefix of information for ILTypeDef. - - The information is enough to perform name resolution for the F# compiler, probe attributes - for ExtensionAttribute etc. This is key to the on-demand exploration of .NET metadata. - This information has to be "Goldilocks" - not too much, not too little, just right. - - - - - Class or interface generated for COM interop. - - - - - Some classes are marked "HasSecurity" even if there are no permissions attached, - e.g. if they use SuppressUnmanagedCodeSecurityAttribute - - - - - Functional update - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value, using delayed reading via a metadata index, for ilread.fs - - - - - Represents IL Type Definitions. - - - - - Calls to <c>FindByName</c> will result in all the ILPreTypeDefs being read. - - - - - Calls to <c>ExistsByName</c> will result in all the ILPreTypeDefs being read. - - - - - Get some information about the type defs, but do not force the read of the type defs themselves. - - - - - Tables of named type definitions. - - - - - A categorization of type definitions into "kinds" - - - - - Type Access. - - - - - Default Unicode encoding for P/Invoke within a type. - - - - - Indicate the initialization semantics of a type. - - - - - Type Layout information. - - - - - Method Impls - - - - - Table of properties in an IL type definition. - - - - - Functional update of the value - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value, using delayed reading via a metadata index, for ilread.fs - - - - - Property definitions - - - - - Table of those events in a type definition. - - - - - Functional update of the value - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value, using delayed reading via a metadata index, for ilread.fs - - - - - Event definitions. - - - - - Tables of fields. Logically equivalent to a list of fields but the table is kept in - a form to allow efficient looking up fields by name. - - - - - The explicit offset in bytes when explicit layout is used. - - - - - Functional update of the value - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value using delayed reading via a metadata index - - - - - Field definitions. - - - - - 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. - - - - - Indicates an instance methods that is virtual or abstract or implements an interface slot. - - - - - The method is exported to unmanaged code using COM interop. - - - - - Indicates a static method. - - - - - Indicates this is an instance methods that is not virtual. - - - - - SafeHandle finalizer must be run. - - - - - Indicates a .ctor method. - - - - - Indicates a .cctor method. - - - - - Some methods are marked "HasSecurity" even if there are no permissions attached, e.g. if they use SuppressUnmanagedCodeSecurityAttribute - - - - - Functional update of the value - - - - - Functional creation of a value, immediate - - - - - Functional creation of a value, with delayed reading of some elements via a metadata index - - - - - IL Method definitions. - - - - - Do not use this - - - - - Do not use this - - - - - Indicates the type argument must have a public nullary constructor. - - - - - Indicates the type argument must be a value type, but not Nullable. - - - - - Indicates the type argument must be a reference type. - - - - - Variance of type parameters, only applicable to generic parameters for generic interfaces and delegates. - - - - - At most one is the parent type, the others are interface types. - - - - - Generic parameters. Formal generic parameter declarations may include the bounds, if any, on the generic parameter. - - - - - Represents a reference to a method declaration in a superclass or interface. - - - - - PInvoke attributes. - - - - - Represents the efficiency-oriented storage of ILSecurityDecls in another item. - - - - - Abstract type equivalent to ILSecurityDecl list - use helpers - below to construct/destruct these. - - - - - Method return values. - - - - - Marshalling map for parameters. COM Interop only. - - - - - Method parameters and return values. - - - - - Represents the efficiency-oriented storage of ILAttributes in another item. - - - - - Attribute with args in decoded form. - - - - - Attribute with args encoded to a binary blob according to ECMA-335 II.21 and II.23.3. - 'decodeILAttribData' is used to parse the byte[] blob to ILAttribElem's as best as possible. - - - - - Attribute instance constructor. - - - - - Decoded arguments. May be empty in encoded attribute form. - - - - - Custom attribute. - - - - - Named args: values and flags indicating if they are fields or properties. - - - - - 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. - - - - - Family - Indicates that the method is accessible only to members of this class and its derived classes. (protected) - - - - - FamilyOrAssembly - Indicates that the method is accessible to derived classes anywhere, as well as to any class _in the assembly_. (protected internal) - - - - - FamilyAndAssembly - Indicates that the method is accessible to members of this type and its derived types that are in _this assembly only_. (private protected) - - - - - Assembly - Indicates that the method is accessible to any class of this assembly. (internal) - - - - - Member Access - - - - - IL method bodies - - - - - Defines a set of opened namespace, type relevant to a code location. - - Emitted to the PortablePDB format. - - - - - Represents an 'open XYZ' opening a namespace - - - - - Represents an 'open type XYZ' opening a type - - - - - Defines an opened namespace, type relevant to a code location. - - Emitted to the PortablePDB format. Note the format supports additional variations on - imported things that are not yet emitted in F#. - - - - - Local variables - - - - - optional idx of parameter giving size plus optional additive i.e. num elems - - - - - Native Types, for marshalling to the native C interface. - These are taken directly from the ILASM syntax. - Most of these are listed in the CLI ECMA-335 Spec (Partition II, 7.4). - - - - - Field Init - - - - - Indicates that a particular local variable has a particular source - language name within a given set of ranges. This does not effect local - variable numbering, which is global over the whole method. - - - - - The instruction set. - - - - - ILCode labels. In structured code each code label refers to a basic block somewhere in the code of the method. - - - - - Field specs. The data given for a ldfld, stfld etc. instruction. - - - - - Functional creation - - - - - The information at the callsite of a method - - - - - Formal identities of fields. - - - - - Functional creation - - - - - Formal identities of methods. - - - - - Actual generic parameters are always types. - - - - - The type being modified. - - - - - The class of the custom modifier. - - - - - True if modifier is "required". - - - - - Custom modifiers. - - - - - Reference a generic arg. - - - - - ILCode pointers. - - - - - Managed pointers. - - - - - Unmanaged pointers. Nb. the type is used by tools and for binding only, not by the verifier. - - - - - Reference types. Also may be used for parents of members even if for members in value types. - - - - - Unboxed types, including builtin types. - - - - - Array types - - - - - Used only in return and pointer types. - - - - - Which type is being referred to? - - - - - Where is the type, i.e. is it in this module, in another module in this assembly or in another assembly? - - - - - The name of the type. This also contains the namespace if Enclosing is empty. - - - - - The type instantiation if the type is generic, otherwise empty - - - - - The name of the type in the assembly using the '.' notation for nested types. - - - - - The list of enclosing type names for a nested type. If non-nil then the first of these also contains the namespace. - - - - - Create an ILTypeSpec. - - - - - Type specs and types. - - - - - Where is the type, i.e. is it in this module, in another module in this assembly or in another assembly? - - - - - The name of the type. This also contains the namespace if Enclosing is empty. - - - - - The name of the type in the assembly using the '.' notation for nested types. - - - - - The list of enclosing type names for a nested type. If non-nil then the first of these also contains the namespace. - - - - - The name of the type in the assembly using the '+' notation for nested types. - - - - - Create a ILTypeRef. - - - - - Type refs, i.e. references to types in some .NET assembly - - - - - Bounds for a single dimensional, zero based array - - - - - Lower-bound/size pairs - - - - - Array shapes. For most purposes the rank is the only thing that matters. - - - - - no 'this' pointer is passed - - - - - accepts an explicit 'this' pointer - - - - - accepts an implicit 'this' pointer - - - - - A reference to a type in the primary assembly - - - - - A reference to a type in another assembly - - - - - A reference to a type in a module in the same assembly - - - - - A reference to the type in the current module - - - - - CLI says this indicates if the assembly can be retargeted (at runtime) to be from a different publisher. - - - - - The fully qualified name of the assembly reference, e.g. mscorlib, Version=1.0.3705 etc. - - - - - Debug info. Values of type "source" can be attached at sequence - points and some other locations. - - - - - Represents guids - - - - - Checks if an assembly resolution may represent a primary assembly that actually contains the - definition of Sytem.Object. Note that the chosen target primary assembly may not actually be the one - that contains the definition of System.Object - it is just the one we are choosing to emit for. - - - - - Represents the target primary assembly - - - - - Find the full set of assemblies referenced by a module. - - - - - Get a version number from a CLR version string, e.g. 1.0.3705.0 - - - - - Get a public key token from a public key. - - - - - Discriminating different important built-in types. - - - - - Strips ILType.Modified from the ILType. - - - - - This is a 'vendor neutral' way of referencing mscorlib. - - - - - Instantiate type variables that occur within types and other items. - - - - - Instantiate type variables that occur within types and other items. - - - - - Unscoping. Clears every scope information, use for looking up IL method references only. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - Rescoping. The first argument indicates how to reference the original scope from - the new scope. - - - - - 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 ILScopeRef.Local, unless we've generated the ILTypeDef in - an auxiliary module or are generating multiple assemblies at - once. - - - - - Making modules. - - - - - Create table of types which is loaded/computed on-demand, and whose individual - elements are also loaded/computed on-demand. Any call to tdefs.AsList 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. - - - - - Making tables of custom attributes, etc. - - - - - The toplevel "class" for a module or assembly. - - - - - Given a delegate type definition which lies in a particular scope, - make a reference to its constructor. - - - - - Derived functions for making some simple constructors - - - - - 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. - - - - - 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. - - - - - 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 '<PrivateImplementationDetails>'/'$$struct0x6000127-1' '<PrivateImplementationDetails>'::'$$method0x6000127-1' - call void System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class System.Array,valuetype System.RuntimeFieldHandle) - idiom. - - - - - Make a type definition. - - - - - Make field definitions. - - - - - Make method definitions. - - - - - Make a formal generic parameters. - - - - - Derived functions for making return, parameter and local variable - objects for use in method definitions. - - - - - Derived functions for making some common patterns of instructions. - - - - - 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. - - - - - Making code. - - - - - Make custom attributes. - - - - - Make generalized versions of possibly-generic types, e.g. Given the ILTypeDef for List, return the type "List<T>". - - - - - Construct references to fields. - - - - - Construct references to constructors. - - - - - Construct references to static, non-generic methods. - - - - - Construct references to static methods. - - - - - Construct references to instance methods. - - - - - Construct references to instance methods. - - - - - Construct references to methods on a given type . - - - - - Make method references and specs. - - - - - Make types. - - - - - Make type specs. - - - - - Make type refs. - - - - - Generate simple references to assemblies and modules. - - - - - 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. - - - - - When writing a binary the fake "toplevel" type definition (called <Module>) - must come first. This function puts it first, and creates it in the returned - list as an empty typedef if it doesn't already exist. - - - - - Build the table of commonly used references given functions to find types in system assemblies - - primaryScopeRef is the primary assembly we are emitting - equivPrimaryAssemblyRefs are ones regarded as equivalent - - - - splitTypeNameRight is like splitILTypeName except the - namespace is kept as a whole string, rather than split at dots. - - - - The <c>splitILTypeName</c> 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. - - - - - 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. - - - - - The "unlinked" view of .NET metadata and code. Central to the Abstract IL library - - - - - Various constants and utilities used when parsing the ILASM format for IL - - - - - This function gets the name of a token as a string - - - - - This function maps production indexes returned in syntax errors to strings representing the non terminal that would be produced by that production - - - - - This function maps integer indexes to symbolic token ids - - - - - This function maps tokens to integer indexes - - - - - Rule token - - - - - Printer for the abstract syntax. - - - - - Morph all type references throughout an entire module. - - - - - Morph each ILTypeRef inside an ILType - - - - - Morph each scope reference inside a type signature. - - - - - 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. - - - - - Functions associated with signing il assemblies which - vary between supported implementations of the CLI Common Language - Runtime, e.g. between the SSCLI, Mono and the Microsoft CLR. - - - - - - 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. - - - - - 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-*.fs - - - - - Compiler use only. Code and constants shared between binary reader/writer. - - - - - Represents a reader of the metadata of a .NET binary. May also give some values (e.g. IL code) from the PE file - if it was provided. - - - - - A function to call to try to get an object that acts as a snapshot of the metadata section of a .NET binary, - and from which we can read the metadata. Only used when metadataOnly=true. - - - - - Only open a metadata reader for the metadata portion of the .NET binary without keeping alive any data associated with the PE reader - - IL code will not be available (mdBody in ILMethodDef will return NotAvailable) - - Managed resources will be reported back as ILResourceLocation.LocalIn (as always) - - Native resources will not be available (none will be returned) - - Static data associated with fields will not be available - - - - - Used to implement a Binary file over native memory, used by Roslyn integration - - - - - Open a binary reader based on the given stream. - This binary reader is not internally cached. - The binary reader will own the given stream and the stream will be disposed when there are no references to the binary reader. - - - - - Open a binary reader based on the given bytes. - This binary reader is not internally cached. - - - - - 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. - Binary reader is internally cached. - - - - - The public API hook for changing the IL assembly reader, used by Resharper - - - - - Binary reader. Read a .NET binary and concert it to Abstract IL data - structures. - - NOTE: - - The metadata in the loaded modules will be relative to - those modules, e.g. ILScopeRef.Local will mean "local to - that module". You must use [rescopeILType] 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. - - - - - MVID of the generated .NET module (used by MDB files to identify debug info) - - - - - Represents an 'open XYZ' opening a namespace - - - - - Represents an 'open type XYZ' opening a type - - - - - Defines the set of 'imports' - that is, opened namespaces, types etc. - at each code location - - Note the C# debug evaluation engine used for F# will give C# semantics to these. That in general - is very close to F# semantics, except for things like union type. - - - - - the local index the name corresponds to - - - - - Check to see if a scope has a local with the same name as any of its children - - If so, do not emit 'scope' itself. Instead, - 1. Emit a copy of 'scope' in each true gap, with all locals - 2. Adjust each child scope to also contain the locals from 'scope', - adding the text " (shadowed)" to the names of those with name conflicts. - - - - - 28 is the size of the IMAGE_DEBUG_DIRECTORY in ntimage.h - - - - - Takes the output file name and returns debug file name. - - - - - The ILPdbWriter - - - - - Write a binary to an array of bytes auitable for dynamic loading. - - - - - Write a binary to the file system. - - - - - The IL Binary writer. - - - - - Write Abstract IL structures at runtime using Reflection.Emit - - - - - Debug info for generated code for classunions - - - - - Debug info for generated code for classunions. - - - - - Generate the helpers? - - - - - Are the representation helpers public? - - - - - Is the representation public? - - - - - Represents a discriminated union type prior to erasure - - - - - Represents a closure prior to erasure - - - - - IlxClosureApps - i.e. types being applied at a callsite. - - - - - Indicates if a static field being used to store an instance of this closure (because it has no free variables) - - - - - Get the constructor for the closure - - - - - Get the static field used to store an instance of this closure, if useStaticField is true - - - - - Represents a usage of a closure - - - - - Union references - - - - - Union alternative - - - - - The name used for the field in parameter or IL field position. - - - - - Union case field - - - - - ILX extensions to Abstract IL types and instructions F# - - - - - Compiler use only. Erase closures - - - - - Used to emit instructions (an interface to the IlxGen.fs code generator) - - - - - Emit the instruction sequence for a "switchdata" operation - - - - - Emit the instruction sequence for a "lddatatag" operation - - - - - Emit the instruction sequence for a "castdata" operation - - - - - Make the IL type for a union type alternative - - - - - Make the type definition for a union type - - - - - Make the instruction sequence for a "brisnotdata" operation - - - - - Make the instruction for a "stdata" operation - - - - - Make the instruction for a "lddataa" operation - - - - - Make the instruction for a "lddata" operation - - - - - Make the instruction sequence for a "isdata" operation - - - - - Make the instruction sequence for a "newdata" operation - - - - - Invert the compilation of the given value and return its current dynamic value and its compiled System.Type - - - - - Generate ILX code for an assembly fragment - - - - - Invert the compilation of the given value and set the storage of the value, even if it is immutable - - - - - Invert the compilation of the given value and clear the storage of the value - - - - - Register a fragment of the current assembly with the ILX code generator. If 'isIncrementalFragment' is true then the input - is assumed to be a fragment 'typed' into FSI.EXE, otherwise the input is assumed to be the result of a '#load' - - - - - Register a set of referenced assemblies with the ILX code generator - - - - - Create an incremental ILX code generator for a single assembly - - - - - An incremental ILX code generator for a single assembly - - - - - Used to support the compilation-inversion operations "ClearGeneratedValue" and "LookupGeneratedValue" - - - - - The generated IL/ILX resources associated with F# quotations - - - - - The security attributes to attach to the assembly - - - - - The attributes for the assembly in F# form - - - - - The generated IL/ILX .NET module attributes - - - - - The generated IL/ILX assembly attributes - - - - - The generated IL/ILX type definitions - - - - - The results of the ILX compilation of one fragment of an assembly - - - - - When set to true, the IlxGen will delay generation of method bodies and generate them later in parallel (parallelized across files) - - - - - Indicates that, whenever possible, use callvirt instead of call - - - - - Suppress ToString emit - - - - - Indicates the code generated is an interactive 'it' expression. We generate a setter to allow clearing of the underlying - storage, even though 'it' is not logically mutable - - - - - Indicates the code is being generated in FSI.EXE and is executed immediately after code generation - This includes all interactively compiled code, including #load, definitions, and expressions - - - - - Is --multiemit enabled? - - - - - Indicates which backend we are generating code for - - - - - A flag to help test emit of debug information - - - - - Indicates if we are generating debug symbols or not - - - - - Indicates if local optimizations are active - - - - - If this is set, then the last module becomes the "main" module - - - - - Indicates if static array data should be emitted using static blobs - - - - - Indicates if we should workaround old reflection emit bugs - - - - - Indicates if we are generating filter blocks - - - - - Indicates how the generated IL code is ultimately emitted - - - - - Determine if an F#-declared value, method or function is compiled as a method. - - - - - Construct a new DependencyProvider - - - - - Construct a new DependencyProvider - - - - - Handle Assembly resolution - - - - - Signature for ResolutionProbe callback - host implements this, it's job is to return a list of assembly paths to probe. - - - - - Construct a new NativeDllResolveHandler - - - - - Construct a new NativeDllResolveHandler - - - - - Signature for Native library resolution probe callback - host implements this, it's job is to return a list of package roots to probe. - - - - - TryFindDependencyManagerInPath - given a #r "key:sometext" go and find a DependencyManager that satisfies the key - - - - - Fetch a dependencymanager that supports a specific key - - - - - Resolve reference for a list of package manager lines - - - - - Returns a formatted help messages for registered dependencymanagers for the host to present - - - - - Returns a formatted error message for the host to present - - - - - Clear the DependencyManager results caches - - - - - Construct a new DependencyProvider with managed and native resolution and specify caching - - - - - Construct a new DependencyProvider with managed and native resolution - - - - - Construct a new DependencyProvider with only native resolution and specify caching - - - - - Construct a new DependencyProvider with only native resolution - - - - - Construct a new DependencyProvider with no dynamic load handlers (only for compilation/analysis) - - - - - Provides DependencyManagement functions. - - The class incrementally collects IDependencyManagerProvider, indexed by key, and - queries them. These are found and instantiated with respect to the compilerTools and outputDir - provided each time the TryFindDependencyManagerByKey and TryFindDependencyManagerInPath are - executed, which are assumed to be invariant over the lifetime of the DependencyProvider. - - - - - Todo describe this API - - - - - Name of the dependency manager - - - - - Key that identifies the types of dependencies that this DependencyManager operates on - E.g - nuget: indicates that this DM is for nuget packages - paket: indicates that this DM is for paket scripts, which manage nuget packages, github source dependencies etc ... - - - - - The help messages for this dependency manager inster - - - - - Resolve the dependencies, for the given set of arguments, go find the .dll references, scripts and additional include values. - - - - - Clear the results cache - - - - - Wraps access to a DependencyManager implementation - - - - - Succeded? - - - - - The resolution output log - - - - - The resolution error log (process stderr) - - - - - The source code file paths - - - - - The roots to package directories - This points to the root of each located package. - The layout of the package manager will be package manager specific. - however, the dependency manager dll understands the nuget package layout - and so if the package contains folders similar to the nuget layout then - the dependency manager will be able to probe and resolve any native dependencies - required by the nuget package. - - This path is also equivalent to - #I @"c:\somepath\to\packages\1.1.1\ResolvedPackage" - - - - - The resolution paths - the full paths to selected resolved dll's. - In scripts this is equivalent to #r @"c:\somepath\to\packages\ResolvedPackage\1.1.1\lib\netstandard2.0\ResolvedAssembly.dll" - - - - - The results of ResolveDependencies - - - - - Get a TcConfigProvider which will return only the exact TcConfig. - - - - - Get a TcConfigProvider which will continue to respect changes in the underlying - TcConfigBuilder rather than delivering snapshots. - - - - - Represents a computation to return a TcConfig. Normally this is just a constant immutable TcConfig, - but for F# Interactive it may be based on an underlying mutable TcConfigBuilder. - - - - - Prevent erasure of conditional attributes and methods so tooling is able analyse them. - - - - - If true, indicates all type checking and code generation is in the context of fsi.exe - - - - - if true - 'let mutable x = Span.Empty', the value 'x' is a stack referring span. Used for internal testing purposes only until we get true stack spans. - - - - - Set if the user has explicitly turned indentation-aware syntax on/off - - - - - Indicates if F# Interactive is using single-assembly emit via Reflection.Emit, where internals are available. - - - - - Check if the primary assembly is mscorlib - - - - - Take '#line' into account? Defaults to true - - - - - Indicates if the compilation will result in F# signature data resource in the generated binary - - - - - Indicates if the compilation will result in an F# optimization data resource in the generated binary - - - - - File system query based on TcConfig settings - - - - - File system query based on TcConfig settings - - - - - Get the loaded sources that exist and issue a warning for the ones that don't - - - - - Allow forking and subsuequent modification of the TcConfig via a new TcConfigBuilder - - - - - Immutable TcConfig, modifications are made via a TcConfigBuilder - - - - - Take '#line' into account? Defaults to true - - - - - Prevent erasure of conditional attributes and methods so tooling is able analyse them. - - - - - if true - 'let mutable x = Span.Empty', the value 'x' is a stack referring span. Used for internal testing purposes only until we get true stack spans. - - - - - A function to call to try to get an object that acts as a snapshot of the metadata section of a .NET binary, - and from which we can read the metadata. Only used when metadataOnly=true. - - - - - If true, indicates all type checking and code generation is in the context of fsi.exe - - - - - Sources added into the build with #load - - - - - Set if the user has explicitly turned indentation-aware syntax on/off - - - - - When using TypeCheckingMode.Graph, this flag determines whether the - resolved file graph should be serialised as a Mermaid diagram into a file next to the output dll. - - - - - Some of the information dedicated to type-checking. - - - - - Parallel type-checking that uses automated file-to-file dependency detection to construct a file graph processed in parallel. - - - - - Default mode where all source files are processed sequentially in compilation order. - - - - - Determines the algorithm used for type-checking. - - - - - Includes F# signature and optimization metadata as resources in the emitting assembly. - Only emits the assembly as a reference assembly. - - - - - Includes F# signature and optimization metadata as resources in the emitting assembly. - Implementation assembly will still be emitted normally, but will emit the reference assembly with the specified output path. - - - - - Represents the file or string used for the --version flag - - - - - The name of the assembly file generated by the project - - - - - Get the logical timestamp that would be the timestamp of the assembly file generated by the project. - - For project references this is maximum of the timestamps of all dependent files. - The project is not actually built, nor are any assemblies read, but the timestamps for each dependent file - are read via the FileSystem. If the files don't exist, then a default timestamp is used. - - The operation returns None only if it is not possible to create an IncrementalBuilder for the project at all, e.g. if there - are fatal errors in the options for the project. - - - - - Evaluate raw contents of the assembly file generated by the project. - 'None' may be returned if an in-memory view of the contents is, for some reason, - not available. In this case the on-disk view of the contents will be preferred. - - - - - Get the short name for this assembly - - - - - Get the identity of the assembly - - - - - Get the identities of the assemblies referenced by this assembly - - - - - Indicates if the assembly has an F# signature data attribute auitable for use with this version of F# tooling - - - - - Indicates if the assembly has any F# signature data attribute - - - - - The raw IL module definition in the assembly, if any. This is not present for cross-project references - in the language service - - - - - Get the table of type forwarders in the assembly - - - - - Get the raw F# signature data in the assembly, if any - - - - - Get the raw F# optimization data in the assembly, if any - - - - - The raw list InternalsVisibleToAttribute attributes in the assembly - - - - - The raw list AutoOpenAttribute attributes in the assembly - - - - - Represents a reference to an F# assembly. May be backed by a real assembly on disk (read by Abstract IL), or a cross-project - reference in FSharp.Compiler.Service. - - - - - Indicates whether experimental features should be enabled automatically - - - - - File suffixes where #light is the default - - - - - Script file suffixes - - - - - Implementation file suffixes - - - - - Signature file suffixes - - - - - Get the name used for FSharp.Core - - - - - The configuration of the compiler (TcConfig and TcConfigBuilder) - - - - - Try to resolve a referenced assembly based on TcConfig settings. - - - - - Try to find a provider-generated assembly - - - - - Try to find the given assembly reference by simple name. Used in magic assembly resolution. Effectively does implicit - unification of assemblies by simple assembly name. - - - - - Try to find the given assembly reference. - - - - - Resolve a referenced assembly and report an error if the resolution fails. - - - - - Report unresolved references that also weren't consumed by any type providers. - - - - - This excludes any framework imports (which may be shared between multiple builds) - - - - - Represents a table of imported assemblies with their resolutions. - Is a disposable object, but it is recommended not to explicitly call Dispose unless you absolutely know nothing will be using its contents after the disposal. - Otherwise, simply allow the GC to collect this and it will properly call Dispose from the finalizer. - - - - - Tables of assembly resolutions - - - - - Represents a resolved imported assembly - - - - - Represents a resolved imported binary - - - - - Lazily populated ilAssemblyRef for this reference. - - - - - Whether or not this is an installed system assembly (for example, System.dll) - - - - - Create the tooltip text for the assembly reference - - - - - Path to the resolvedFile - - - - - The original reference to the assembly. - - - - - Process a group of #r in F# Interactive. - Adds the reference to the tcImports and add the ccu to the type checking environment. - - - - - Encode the F# interface data into a set of IL attributes and resources - - - - - Determine if an IL resource attached to an F# assembly is an F# quotation data resource for reflected definitions - - - - - Determine if an IL resource attached to an F# assembly is an F# optimization data resource - - - - - Determine if an IL resource attached to an F# assembly is an F# signature data resource - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - Contains logic to coordinate assembly resolution and manage the TcImports table of referenced - assemblies. - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Used internally and in LegacyHostedCompilerForTesting - - - - - Remove 'implicitIncludeDir' from a file name before output - - - - - Get a diagnostics logger that filters the reporting of warnings based on scoped pragma information - - - - - Write extra context information for a diagnostic - - - - - Output all of a diagnostic to a buffer, including range - - - - - Indicates if a diagnostic should be reported as an error - - - - - Indicates if a diagnostic should be reported as a warning - - - - - Indicates if a diagnostic should be reported as an informational - - - - - Format the core of the diagnostic as a string. Doesn't include the range information. - - - - - Eagerly format a PhasedDiagnostic return as a new PhasedDiagnostic requiring no formatting of types. - - - - - Get the number associated with a diagnostic - - - - - Get the location associated with a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - This exception is an old-style way of reporting a diagnostic - - - - - Contains logic to prepare, post-process, filter and emit compiler diagnsotics - - - - - Callback that returns a previously calculated 'Result and updates 'State accordingly. - - - - - Helper class for mapping signature files to implementation files and vice versa. - - - - - A function for querying a Trie (the Trie is defined within the function's context) - - - - - A node was found with one or more files that contain relevant definitions required for type-checking. - - - - A node was found but no file exposes data for the LongIdentifier in question. - - This could happen if there is a single file with a top-level module `module A.B`, - and we search for `A`. - Although the `A` path exists in the Trie, it does not contain any relevant definitions (beyond itself). - - - - - No node was found for the path in the trie. - - - - - Result of querying a Trie Node. - - - - - File identifiers and its content extract for dependency resolution - - - - - Being explicit about nested modules allows for easier reasoning what namespaces (paths) are open. - For example we can limit the scope of an `OpenStatement` to symbols defined inside the nested module. - - - - - Any identifier that has more than one piece (LongIdent or SynLongIdent) in it. - The last part of the identifier should not be included. - - - - - The `open X.Y.Z` syntax. - - - - - Any toplevel namespace a file might have. - In case a file has `module X.Y.Z`, then `X.Y` is considered to be the toplevel namespace - - - - - A significant construct found in the syntax tree of a file. - This construct needs to be processed in order to deduce potential links to other files in the project. - - - - - Child nodes - - - - - Information about this node. - - - - - Zero or more files that define the LongIdentifier represented by this node. - - - - - A node in the Trie structure. - - - - - Files that use this namespace but don't contain any types. - - - - - Files that expose types that are part of this namespace. - - - - - There is a subtle difference between a module and namespace. - A namespace does not necessarily expose a set of dependent files. - Only when the namespace exposes types that could later be inferred. - Children of a namespace don't automatically depend on each other for that reason - - - - - Combines the file name, index and parsed syntax tree of a file in a project. - - - - - Represents one or more identifiers in the syntax tree. - For example, `[ "X"; "Y"; "Z" ]` in `open X.Y.Z` - - - - - Represents the string value of a single identifier in the syntax tree. - For example, `"Hello"` in `module Hello`. - - - - - File name captured by ParsedInput.FileName. - - - - - The index of a file inside a project. - - - - - A Directed Acyclic Graph (DAG) of arbitrary nodes. - - - - - Create a simple Mermaid graph and save it under the path specified. - - - - - Print the contents of the graph to the standard output. - - - - - Create a reverse of the graph. - - - - - Create a transitive closure of the graph in O(n^2) time (but parallelize it). - The resulting graph contains edge A -> C iff the input graph contains a (directed) non-zero length path from A to C. - - - - - Build the graph. - - - - - Functions for operating on the Graph type. - - - - - Process all the files (in parallel) in a project to construct a Root TrieNode. - When the project has signature files, the implementation counterparts will not be processed. - - - - - Extract the FileContentEntries from the ParsedInput of a file. - - - - - Construct an approximate* dependency graph for files within a project, based on their ASTs. - - Maps the index of a signature file with the index of its implementation counterpart and vice versa. - The files inside a project. - A tuple consisting of a dictionary of FileIndex (alias for int) and a Trie - - - *The constructed graph is a supergraph of the "necessary" file dependency graph, - ie. if file A is necessary to type-check file B, the resulting graph will contain edge B -> A. - The opposite is not true, ie. if file A is not necessary to type-check file B, the resulting graph *might* contain edge B -> A. - This is because the graph resolution algorithm has limited capability as it is based on ASTs alone. - - - The file order is used by the resolution algorithm to remove edges not allowed by the language. - Ie. if file B preceeds file A, the resulting graph will not contain edge B -> A. - Hence this function cannot, as it stands, be used to help create a "reasonable" file ordering for an unordered set of files. - - - - - Process an open path (found in the ParsedInput) with a given FileContentQueryState. - This code is only used directly in unit tests. - - - - Query a TrieNode to find a certain path. - - This code is only used directly in unit tests. - - - - Logic for constructing a file dependency graph for the purposes of parallel type-checking. - - - - - An already processed node in the graph, with its result available - - - - - Information about the node in a graph, describing its relation with other nodes. - - - - - A generic method to generate results for a graph of work items in parallel. - Processes leaves first, and after each node has been processed, schedules any now unblocked dependants. - Returns a list of results, one per item. - Uses the Thread Pool to schedule work. - - Graph of work items - A function to generate results for a single item - Cancellation token - - An alternative scheduling approach is to schedule N parallel tasks that process items from a BlockingCollection. - My basic tests suggested it's faster, although confirming that would require more detailed testing. - - - - - Parallel processing of graph of work items with dependencies - - - - - Get the typing environment implied by the set of signature files and/or inferred signatures of implementation files checked so far - - - - - Get the typing environment implied by the set of implementation files checked so far - - - - - The inferred contents of the assembly, containing the signatures of all files. - - - - - The CcuThunk for the current assembly being checked - - - - - Represents the incremental type checking state for a set of inputs - - - - - State used to de-deduplicate module names along a list of file names - - - - - Check a single input and finish the checking - - - - - Check a closed set of inputs - - - - - Finish the checking of a closed set of inputs - - - - - Finish the checking of multiple inputs - - - - - Check one input, returned as an Eventually computation - - - - - Returns partial type check result for skipped implementation files. - - - - - Get the initial type checking state for a set of inputs - - - - - Get the initial type checking environment including the loading of mscorlib/System.Core, FSharp.Core - applying the InternalsVisibleTo in referenced assemblies and opening 'Checked' if requested. - - - - - Parse multiple input files from disk - - - - - Parse one input file - - - - - Parse one input source text - - - - - Parse one input stream - - - - - Process the #nowarn in an input and integrate them into the TcConfig - - - - - Process all the #r, #I etc. in an input. For non-scripts report warnings about ignored directives. - - - - - A general routine to process hash directives - - - - - Parse a single input (A signature file or implementation file) - - - - - Checks if a ParsedInput is using a module name that was already given and deduplicates the name if needed. - - - - - Contains logic to coordinate the parsing and checking of one or a group of files - - - - - Diagnostics seen while processing the compiler options implied root of closure - - - - - Diagnostics to show for root of closure (used by fsc.fs) - - - - - Diagnostics seen while processing resolutions - - - - - The #nowarns - - - - - The original #load references, including those that didn't resolve - - - - - The list of all sources in the closure with inputs when available, with associated parse errors and warnings - - - - - The list of references that were not resolved during load closure. - - - - - Was the SDK directory override given? - - - - - Whether we're decided to use .NET Framework analysis for this script - - - - - The resolved pacakge references along with the ranges of the #r positions in each file. - - - - - The resolved references along with the ranges of the #r positions in each file. - - - - - The source files along with the ranges of the #load positions in each file. - - - - - Analyze a script text and find the closure of its references. - Used from FCS, when editing a script file. - - - - - Analyze a set of script files and find the closure of their references. The resulting references are then added to the given TcConfig. - Used from fsi.fs and fsc.fs, for #load and command line. - - - - - Compute the load closure of a set of script files - - - - - The spec value describes the action of the argument, - and whether it expects a following parameter. - - - - - Apply args to TcConfigBuilder and return new list of source files - - - - - Parse and process a set of compiler options - - - - - Compiler Option Parser - - - - - Writes the XmlDocSig property of each element (field, union case, etc) - of the specified compilation unit to an XML document in a new text file. - - - - - Writes the XML document signature to the XmlDocSig property of each - element (field, union case, etc) of the specified compilation unit. - The XmlDocSig is the unique identifier of this XmlDoc in the generated Xml documentation file. - The full format is described at https://learn.microsoft.com/dotnet/csharp/language-reference/language-specification/documentation-comments#id-string-format - - - - - Optional static linking of all DLLs that depend on the F# Library, plus other specified DLLs - - - - - Represents the configuration settings used to perform strong-name signing - - - - - Get the object used to perform strong-name signing - - - - - Validate the attributes and configuration settings used to perform strong-name signing - - - - - Get the SigningInfo for specific values(delaysign, tcConfig.publicsign, signer, container) - - - - - For unit testing - - - - - For unit testing - - - - - For unit testing - - - - - Put together all the pieces of information to create the overall IL ModuleDef for - the generated assembly - - - - - Helpers for finding attributes - - - - - Called when 'too many errors' has occurred - - - - - Called when a diagnostic occurs - - - - - An diagnostic logger that reports errors up to some maximum, notifying the exiter when that maximum is reached - - Used only in LegacyHostedCompilerForTesting - - - - - The default DiagnosticsLoggerProvider implementation, reporting messages to the Console up to the maxerrors maximum - - - - - DiagnosticLoggers can be sensitive to the TcConfig flags. During the checking - of the flags themselves we have to create temporary loggers, until the full configuration is - available. - - - - - Read the parallelReferenceResolution flag from environment variables - - - - - The main (non-incremental) compilation entry point used by fsc.exe - - - - - Indicates that the XML for the documentation can be found in a .xml documentation file for the given DLL, using the given signature key - - - - - The text for documentation for in-memory references. - - - - - No documentation is available - - - - - Describe a comment as either a block of text or a file+signature reference into an intellidoc file. - - - - - Types whose static members and nested types is opened with this declaration. - - - - - The syntactic target of the declaration - - - - - Range of the open declaration. - - - - - Modules or namespaces which is opened with this declaration. - - - - - The syntactic target of the declaration - - - - - If it's `namespace Xxx.Yyy` declaration. - - - - - Scope in which open declaration is visible. - - - - - Represents open declaration in F# code. - - - - - Get the range of the name of the attribute - - - - - The named arguments for the attribute - - - - - Indicates if the attribute type is in an unresolved assembly - - - - - The arguments to the constructor for the attribute - - - - - The type of the attribute - - - - - Indicates if attribute matchies the full name of the given type parameter - - - - - Format the attribute using the rules of the given display context - - - - - Represents a custom attribute attached to F# source code or a compiler .NET component - - - - - Get the type definition for a type - - - - - Indicates this is a named type in an unresolved assembly - - - - - Indicates if the type is a tuple type (reference or struct). The GenericArguments property returns the elements of the tuple type. - - - - - Indicates if the type is a struct tuple type. The GenericArguments property returns the elements of the tuple type. - - - - - Indicates if the type is a measure type. - - - - - Indicates if the type is a variable type, whether declared, generalized or an inference type parameter - - - - - Indicates if the type is a function type. The GenericArguments property returns the domain and range of the function type. - - - - - Indicates if the type is an anonymous record type. The GenericArguments property returns the type instantiation of the anonymous record type - - - - - Indicates this is an abbreviation for another type - - - - - Indicates if the type is constructed using a named entity, including array and byref types - - - - - 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 - - - - - Canonical form of the type with abbreviations, measures, and F# tuples and functions erased. - - - - - The fully qualified name of the type or module without strong assembly name. - - - - - Get the base type, if any, taking into account the instantiation of this type - if it is an instantiation of a generic type. - - - - - Get the details of the anonymous record type. - - - - - Get all the interface implementations, by walking the type hierarchy, taking into account the instantiation of this type - if it is an instantiation of a generic type. - - - - - Get the type for which this is an abbreviation - - - - - Strip any outer abbreviations from the type - - - - - Adjust the types in a group of curried parameters and return type by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust the types in a group of curried parameters by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust the types in a group of parameters by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust the type in a single parameter by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust a group of types by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Adjust the type by removing any occurrences of type inference variables, replacing them - systematically with lower-case type inference variables such as <c>'a</c>. - - - - - Instantiate generic type parameters in a type - - - - - Format the type using the rules of the given display context - - - - - Format the type - with constraints - using the rules of the given display context - - - - - Format the type using the rules of the given display context - - - - - Format the type using the rules of the given display context, skipping type constraints - - - - - Internal use only. Create a ground type. - - - - - Get the type indicating signature of the active pattern - - - - - The names of the active pattern cases - - - - - The whole group name - - - - - Indicate this is a total active pattern - - - - - Try to get the entity in which the active pattern is declared - - - - - Represents all cases within an active pattern - - - - - XML documentation signature for the active pattern case, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - The name of the active pattern case - - - - - Index of the case in the pattern group - - - - - The group of active pattern cases this belongs to - - - - - The location of declaration of the active pattern case - - - - - A subtype of FSharpSymbol that represents a single case within an active pattern - - - - - The declared or inferred type of the parameter - - - - - The optional name of the parameter - - - - - Indicate this is a param array argument - - - - - Indicate this is an out argument - - - - - Indicate this is an optional argument - - - - - Indicate this is an in argument - - - - - The declaration location of the parameter - - - - - The declared attributes of the parameter - - - - - A subtype of FSharpSymbol that represents a parameter - - - - - XML documentation signature for the value, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - Get an associated setter method of the property - - - - - Get the logical name of the member - - - - - Indicates if this is a [<Literal>] value, and if so what value? (may be null) - - - - - Indicated if this is a value - - - - - Indicated if this is a value compiled to a method - - - - - Indicates if the member, function or value is in an unresolved assembly - - - - - Indicates if this is an F# type function - - - - - Indicates if this is a value that has been referenced - - - - - Indicates if this is a ref cell - - - - - Indicates if this is a setter method for a property, or a use of a property in setter mode - - - - - Indicates if this is a getter method for a property, or a use of a property in getter mode - - - - - Indicates if this is a property member - - - - - Indicates if this is an 'override', 'default' or an explicit implementation of an interface member - - - - - Indicates if this is a mutable value - - - - - Indicates if this is a module or member value - - - - - Indicates if this is a method member - - - - - Indicates if this is the "x" in "member x.M = ..." - - - - - Indicates if this is a member, including extension members? - - - - - Indicates if this is an instance member in compiled code. - - Explanatory note: some members such as IsNone and IsSome on types with UseNullAsTrueValue appear - as instance members in F# code but are compiled as static members. - - - - - Indicates if this is an instance member, when seen from F#? - - - - - Indicates if this is an implicit constructor? - - - - - Indicated if this is a function - - - - - Indicates if this is an extension member? - - - - - Indicates if this is an explicit implementation of an interface member - - - - - Indicates if this is a remove method for an event - - - - - Indicates if this is an add method for an event - - - - - Indicates if this is an event member - - - - - Indicates if this is an abstract member? - - - - - Indicates if this is the "x" in "type C() as x = ..." - - - - - Indicates if this is a constructor. - - - - - Indicates if this is a compiler generated value - - - - - Indicates if this is "base" in "base.M(...)" - - - - - Indicates if this value or member is an F# active pattern - - - - - Get a result indicating if this is a must-inline value - - - - - Gets the list of the abstract slot signatures implemented by the member - - - - - Indicates if the value has a signature file counterpart - - - - - Indicates if this is a property and there exists an associated setter method - - - - - Indicates if this is a property and there exists an associated getter method - - - - - Get an associated getter method of the property - - - - - Get the typars of the member, function or value - - - - - Safe version of `FullType`. - - - - - Get the full type of the member, function or value when used as a first class value - - - - - Get an associated remove method of an event - - - - - Indicate if an event can be considered to be a property for the F# type system of type IEvent or IDelegateEvent. - In this case ReturnParameter will have a type corresponding to the property type. For - non-standard events, ReturnParameter will have a type corresponding to the delegate type. - - - - - Gets the event symbol implied by the use of a property, - for the case where the property is actually an F#-declared CLIEvent. - - Uses of F#-declared events are considered to be properties as far as the language specification - and this API are concerned. - - - - - Get an associated delegate type of an event - - - - - Get an associated add method of an event - - - - - Get the name as presented in F# error messages and documentation - - - - - Get the enclosing entity for the definition - - - - - Get the declaration location of the member, function or value - - - - List of list of parameters, where each nested item represents a defined parameter - - Typically, there is only one nested list. - However, code such as 'f (a, b) (c, d)' contains two groups, each with two parameters. - In that example, there is a list made up of two lists, each with a parameter. - - - - - Get 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 collection of values. - - - - - Get the logical enclosing entity, which for an extension member is type being extended - - - - - Get the accessibility information for the member, function or value - - - - - Full name with last part replaced with display name. - - - - - Full operator compiled name. - - - - - Check if this method has an entrpoint that accepts witness arguments and if so return - the name of that entrypoint and information about the additional witness arguments - - - - - Get the signature text to include this Symbol into an existing signature file. - - - - - Format the type using the rules of the given display context - - - - Gets the overloads for the current method. - - - Indicates whether to filter the overloads to match the number of parameters in the current symbol - - - - - Format the type using the rules of the given display context - - - - - A subtype of F# symbol that represents an F# method, property, event, function or value, including extension members. - - - - - Indicates the value is aggressively inlined by the .NET runtime - - - - - Indicates the value is never inlined - - - - - Indicates the value is optionally inlined - - - - - Indicates the value is always inlined in statically compiled code - - - - - Gets further information about a choice constraint - - - - - Gets further information about a member constraint - - - - - Indicates a constraint that a type is an unmanaged type - - - - - Indicates a constraint that a type has a 'null' value - - - - - Indicates a constraint that is a type is a simple choice between one of the given ground types. Used by printf format strings. - - - - - Indicates a constraint that a type has a parameterless constructor - - - - - Indicates a constraint that a type is a reference type - - - - - Indicates a constraint that a type is a non-Nullable value type - - - - - Indicates a constraint that a type has a member with the given signature - - - - - Indicates a constraint that a type supports F# generic equality - - - - - Indicates a constraint that a type is an enum with the given underlying - - - - - Indicates a constraint that a type is a delegate from the given tuple of args to the given return type - - - - - Indicates a default value for an inference type variable should it be neither generalized nor solved - - - - - Indicates a constraint that a type supports F# generic comparison - - - - - Indicates a constraint that a type is a subtype of the given type - - - - - Gets further information about an enumeration constraint - - - - - Gets further information about a delegate constraint - - - - - Gets further information about a defaults-to constraint - - - - - Gets further information about a coerces-to constraint - - - - - Represents a constraint on a generic type parameter - - - - - Get the default type associated with the 'defaults to' constraint - - - - - Get the priority off the 'defaults to' constraint - - - - - Represents further information about a 'defaults to' constraint on a generic type parameter - - - - - Get the tupled argument type required by the constraint - - - - - Get the return type required by the constraint - - - - - Represents further information about a delegate constraint on a generic type parameter - - - - - Get the types that may be used to satisfy the constraint - - - - - Get the return type of the method required by the constraint - - - - - Get the name of the method required by the constraint - - - - - Indicates if the the method required by the constraint must be static - - - - - Get the argument types of the method required by the constraint - - - - - Represents further information about a member constraint on a generic type parameter - - - - - Get the range of the construct - - - - - Get the name of the static parameter - - - - - Get the kind of the static parameter - - - - - Indicates if the static parameter is optional - - - - - Get the default value for the static parameter - - - - - Get the declaration location of the static parameter - - - - - A subtype of FSharpSymbol that represents a static parameter to an F# type provider - - - - - Get the XML documentation for the entity - - - - - Get the name of the generic parameter - - - - - Indicates if this is a statically resolved type variable - - - - - Indicates if this is a measure variable - - - - - Indicates if this is a compiler generated type parameter - - - - - Get the range of the generic parameter - - - - - Get the declared or inferred constraints for the type parameter - - - - - Get the declared attributes of the type parameter. - - - - - A subtype of FSharpSymbol that represents a generic parameter for an FSharpSymbol - - - - - Represents the rights of a compilation to access symbols - - - - - Get the XML documentation signature for .xml file lookup for the field, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - Get the attributes attached to generated property - - - - - Get the name of the field - - - - - Get the default initialization info, for static literals - - - - - Indicates if the field is declared volatile - - - - - Indicates if the record field is for a type in an unresolved assembly - - - - - Indicates if the field is declared in a union case - - - - - Indicates a static field - - - - - Indicates if the field name was generated by compiler (e.g. ItemN names in union cases and DataN in exceptions). - This API returns true for source defined symbols only. - - - - - Indicates if the field is declared 'static' - - - - - Indicates if the field has a literal value - - - - - Indicates if the field declared is declared 'DefaultValue' - - - - - Indicates a compiler generated field, not visible to Intellisense or name resolution - - - - - Is this a field from an anonymous record type? - - - - - Get the type of the field, w.r.t. the generic parameters of the enclosing type constructor - - - - - Get the attributes attached to generated field - - - - - Returns the declaring union case symbol - - - - - Get the declaring entity of this field, if any. Fields from anonymous types do not have a declaring entity - - - - - Get the declaration location of the field - - - - - If the field is from an anonymous record type then get the details of the field including the index in the sorted array of fields - - - - - Indicates if the declared visibility of the field, not taking signatures into account - - - - - A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language - - - - - The sorted labels of the anonymous type - - - - - Names of any enclosing types of the compiled form of the anonymous type (if the anonymous type was defined as a nested type) - - - - - The name of the compiled form of the anonymous type - - - - - The assembly where the compiled form of the anonymous type is defined - - - - - A subtype of FSharpSymbol that represents a record or union case field as seen by the F# language - - - - - Get the XML documentation signature for .xml file lookup for the union case, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - Get the type constructed by the case. Normally exactly the type of the enclosing type, sometimes an abbreviation of it - - - - - Get the name of the union case - - - - - Indicates if the union case is for a type in an unresolved assembly - - - - - Indicates if the union case has field definitions - - - - - Get the data carried by the case. - - - - - Get the declaring entity of the case - - - - - Get the range of the name of the case - - - - - Get the name of the case in generated IL code - - - - - Get the attributes for the case, attached to the generated static method to make instances of the case - - - - - Indicates if the declared visibility of the union constructor, not taking signatures into account - - - - - A subtype of FSharpSymbol that represents a union case as seen by the F# language - - - - - Get the name of the abstract slot - - - - - Get the generic arguments of the abstract slot - - - - - Get the generic arguments of the type defining the abstract slot - - - - - Get the declaring type of the abstract slot - - - - - Get the return type of the abstract slot - - - - - Get the arguments of the abstract slot - - - - - Represents the signature of an abstract slot of a class or interface - - - - - The declared or inferred type of the parameter - - - - - The optional name of the parameter - - - - - Indicate this is an out argument - - - - - Indicate this is an optional argument - - - - - Indicate this is an in argument - - - - - The declared attributes of the parameter - - - - - Represents a parameter in an abstract method of a class or interface - - - - - Get the return type of the delegate signature - - - - - Get the argument types of the delegate signature - - - - - Represents a delegate signature in an F# symbol - - - - - Get the XML documentation signature for the entity, used for .xml file lookup for compiled code - - - - - Get the XML documentation for the entity - - - - - Indicates if the type prefers the "tycon<a,b>" syntax for display etc. - - - - - Get the cases of a union type - - - - - Get the full name of the type or module if it is available - - - - - Get the static parameters for a provided type - - - - - Get the declared accessibility of the representation, not taking signatures into account - - - - - Get the fully qualified name of the type or module - - - - - Get the modules and types defined in a module, or the nested types of a type - - - - - Get the namespace containing the type or module, if any. Use 'None' for item not in a namespace. - - - - - Get the properties, events and methods of a type definitions, or the functions and values of a module - - - - - Get the name of the type or module, possibly with `n mangling - - - - - Indicates if the entity is a struct or enum - - - - - Indicates if the entity is in an unresolved assembly - - - - - Indicates if the entity is a 'fake' symbol related to a static instantiation of a type provider - - - - - Indicates if the entity is a generated provided type - - - - - Indicates if the entity is an erased provided type - - - - - Indicates if the entity is a provided type - - - - - Indicates if the entity is a type definition for a reference type where the implementation details are hidden by a signature - - - - - Indicates if the entity is a part of a namespace path - - - - - Indicates if the entity is a measure definition - - - - - Indicates if the entity is an interface type definition - - - - - Indicates if the entity is union type - - - - - Indicates if the entity is record type - - - - - Indicates if the entity is an F# module definition - - - - - Indicates an F# exception declaration - - - - - Indicates if the entity is a measure, type or exception abbreviation - - - - - Indicates if this is a reference to something in an F#-compiled assembly - - - - - Indicates if the entity is an enum type definition - - - - - Indicates if the entity is a delegate type definition - - - - - Indicates if the entity is a class type definition - - - - - Indicates if is the 'byref<_>' type definition used for byref types in F#-compiled assemblies - - - - - Check if the entity inherits from System.Attribute in its type hierarchy - - - - - Indicates if the entity is an array type - - - - - Indicates if the entity is an abstract class - - - - - Indicates that a module is compiled to a class with the given mangled name. The mangling is reversed during lookup - - - - - Indicates if 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 - - - - - Get the full name of the type or module - - - - - Get the fields of a record, class, struct or enum from the perspective of the F# language. - This includes static fields, the 'val' bindings in classes and structs, and the value definitions in enums. - For classes, the list may include compiler generated fields implied by the use of primary constructors. - - - - - Indicates if the type is a delegate with the given Invoke signature - - - - - Get the name of the type or module as displayed in F# code - - - - - Get the enclosing entity for the definition - - - - - Get the declared interface implementations - - - - - Get the declaration location for the type constructor - - - - - Get the compiled name of the type or module, possibly with `n mangling. This is identical to LogicalName - unless the CompiledName attribute is used. - - - - - The fully qualified name of the type or module without strong assembly name. - - - - - Get the base type, if any - - - - - Get the declared attributes for the type - - - - - Get the rank of an array type - - - - - Get all the interface implementations, by walking the type hierarchy - - - - - Get all compilation paths, taking `Module` suffixes into account. - - - - - Get all active pattern cases defined in all active patterns in the module. - - - - - Get the declared accessibility of the type - - - - - Get the path used to address the entity (e.g. "Namespace.Module1.NestedModule2"). Gives - "global" for items not in a namespace. - - - - - Get the type abbreviated by an F# type abbreviation - - - - - Get the source text of the entity's signature to be used as metadata. - - - - - Safe version of `GetMembersFunctionsAndValues`. - - - - - Safe version of `FullName`. - - - - - Safe version of `DisplayName`. - - - - - Safe version of `CompiledName`. - - - - - Public nested entities (methods, functions, values, nested modules). - - - - - Instantiates FSharpType - - - - - A subtype of FSharpSymbol that represents a type definition or module as seen by the F# language - - - - - The (non-nested) module and type definitions in this signature - - - - - Get the declared attributes for the assembly. - Only available when parsing an entire project. - - - - - Safe version of `Entities`. - - - - - Find entity using compiled names - - - - - Represents an inferred signature of part of an assembly as seen by the F# language - - - - - The simple name for the assembly - - - - - The qualified name of the assembly - - - - - Indicates if the assembly was generated by a type provider and is due for static linking - - - - - The file name for the assembly, if any - - - - - The contents of the this assembly - - - - - Represents an assembly as seen by the F# language - - - - - Get the signature location for the symbol if it was declared in an implementation - - - - - Get the implementation location for the symbol if it was declared in a signature that has an implementation - - - - - Get a textual representation of the full name of the symbol. The text returned for some symbols - may not be a valid identifier path in F# code, but rather a human-readable representation of the symbol. - - - - - Gets the display name for the symbol where double backticks are not added for non-identifiers - - - - - Gets the display name for the symbol. Double backticks are added if the name is not a valid identifier. - - For FSharpParameter symbols without a name for the paramater, this returns "````" - - - - - Get the declaration location for the symbol - - - - - Get the attributes for the symbol, if any - - - - - Get the assembly declaring this symbol - - - - - Get the declared accessibility of the symbol, if any - - - - - Try to get an attribute matching the full name of the given type parameter - - - - - Return true if two symbols are effectively the same when referred to in F# source code text. - This sees through signatures (a symbol in a signature will be considered effectively the same as - the matching symbol in an implementation). In addition, other equivalences are applied - when the same F# source text implies the same declaration name - for example, constructors - are considered to be effectively the same symbol as the corresponding type definition. - - This is the relation used by GetUsesOfSymbol and GetUsesOfSymbolInFile. - - - - - Computes if the symbol is accessible for the given accessibility rights - - - - - Indicates if this symbol has an attribute matching the full name of the given type parameter - - - - - A hash compatible with the IsEffectivelySameAs relation - - - - - Represents a symbol in checked F# source code or a compiled .NET component. - - The subtype of the symbol may reveal further information and can be one of FSharpEntity, FSharpUnionCase - FSharpField, FSharpGenericParameter, FSharpStaticParameter, FSharpMemberOrFunctionOrValue, FSharpParameter, - or FSharpActivePatternCase. - - - - - Causes type signatures to be formatted with suffix-style generic parameters, - for example `int list` - - - - - Causes type signatures to be formatted with prefix-style generic parameters, - for example `list<int>`. - - - - - Represents the information needed to format types and other information in a style - suitable for use in F# source text at a particular source location. - - Acquired via GetDisplayEnvAtLocationAlternate and similar methods. May be passed - to the Format method on FSharpType and other methods. - - - - - Indicates the symbol has public accessibility. - - - - - Indicates the symbol has protected accessibility. - - - - - Indicates the symbol has private accessibility. - - - - - Indicates the symbol has internal accessibility. - - - - - The underlying Accessibility - - - - - Indicates the accessibility of a symbol, as seen by the F# language - - - - - The signature of the implemented abstract slot - - - - - The generic parameters of the method - - - - - The parameters of the method - - - - - The expression that forms the body of the method - - - - - Represents a checked method in an object expression, as seen by the F# language. - - - - - The type of the expression - - - - - The range of the expression - - - - - The immediate sub-expressions of the expression. - - - - - Represents a checked and reduced expression, as seen by the F# language. The active patterns - in 'FSharp.Compiler.SourceCodeServices' can be used to analyze information about the expression. - - Pattern matching is reduced to decision trees and conditional tests. Some other - constructs may be represented in reduced form. - - - - - Represents the declaration of a static initialization action - - - - - Represents the declaration of a member, function or value, including the parameters and body of the member - - - - - Represents the declaration of a type - - - - - Represents a declaration in an implementation file, as seen by the F# language - - - - - The qualified name acts to fully-qualify module specifications and implementations - - - - - Indicates if the implementation file is a script - - - - - Indicates if the implementation file has an explicit entry point - - - - - Get the system path of the implementation file - - - - - Get the declarations that make up this implementation file - - - - - Represents the definitional contents of a single file or fragment in an assembly, as seen by the F# language - - - - - The contents of the implementation files in the assembly - - - - - Represents the definitional contents of an assembly, as seen by the F# language - - - - - Indicates a witness argument index from the witness arguments supplied to the enclosing method - - - - - Matches expressions for an unresolved call to a trait - - - - - Matches object expressions, returning the base type, the base call, the overrides and the interface implementations - - - - - Matches expressions which set a field in a .NET type - - - - - Matches expressions which fetch a field from a .NET type - - - - - Matches expressions which are IL assembly code - - - - - Matches expressions which create an instance of a delegate type - - - - - Matches try/with expressions - - - - - Matches try/finally expressions - - - - - Matches while loops - - - - - Matches fast-integer loops (up or down) - - - - - Matches debug points at leaf expressions in control flow - - - - - Matches sequential expressions - - - - - Matches expressions which take the address of a location - - - - - Matches constant expressions, including signed and unsigned integers, strings, characters, booleans, arrays - of bytes and arrays of unit16. - - - - - Matches default-value expressions, including null expressions - - - - - Matches expressions which set the contents of a mutable variable - - - - - Matches expressions which set the contents of an address - - - - - Matches expressions which test the runtime type of a value - - - - - Matches array expressions - - - - - Matches expressions which coerce the type of a value - - - - - Matches expressions which get a value from a tuple - - - - - Matches tuple expressions - - - - - Matches expressions which test if an expression corresponds to a particular union case - - - - - Matches expressions which gets the tag for a union case - - - - - Matches expressions which set a field from a union case (only used in FSharp.Core itself) - - - - - Matches expressions which get a field from a union case - - - - - Matches expressions which create an object corresponding to a union case - - - - - Matches expressions which set a field in a record or class - - - - - Matches expressions which get a field from a record or class - - - - - Matches expressions getting a field from an anonymous record. The integer represents the - index into the sorted fields of the anonymous record. - - - - - Matches anonymous record expressions - - - - - Matches record expressions - - - - - Matches expressions which are let-rec definitions - - - - - Matches expressions which are quotation literals - - - - - Matches expressions which are uses of the 'base' value - - - - - Matches expressions which are uses of the 'this' value - - - - - Matches expressions which are calls to object constructors - - - - - Like Call but also indicates witness arguments - - - - - Matches expressions which are calls to members or module-defined functions. When calling curried functions and members the - arguments are collapsed to a single collection of arguments, as done in the compiled version of these. - - - - - Matches expressions which are let definitions - - - - - Matches expressions which are conditionals - - - - - Matches expressions which are lambda abstractions - - - - - Special expressions at the end of a conditional decision structure in the decision expression node of a DecisionTree . - The given expressions are passed as values to the decision tree target. - - - - - Matches expressions with a decision expression, each branch of which ends in DecisionTreeSuccess passing control and values to one of the targets. - - - - - Matches expressions which are type abstractions - - - - - Matches expressions which are the application of function values - - - - - Matches expressions which are uses of values - - - - - A collection of active patterns to analyze expressions - - - - - Returns (originalEntity, abbreviatedEntity, abbreviatedType) - - - - - Patterns over FSharpSymbol and derivatives. - - - - - Get the captured diagnostics - - - - - Create the diagnostics logger - - - - - An error logger that capture errors, filtering them according to warning levels etc. - - - - - Gets the sub-category for the diagnostic - - - - - Gets the start line for the diagnostic - - - - - Gets the start column for the diagnostic - - - - - Gets the start position for the diagnostic - - - - - Gets the severity for the diagnostic - - - - - Gets the range for the diagnostic - - - - - Gets the message for the diagnostic - - - - - Gets the file name for the diagnostic - - - - - Gets the contextually-relevant data to each particular diagnostic for things like code fixes - - - - - Gets the full error number text e.g "FS0031" - - - - - Gets the number prefix for the diagnostic, usually "FS" but may differ for analyzers - - - - - Gets the number for the diagnostic - - - - - Gets the end line for the diagnostic - - - - - Gets the end column for the diagnostic - - - - - Gets the end position for the diagnostic - - - - - Newlines are recognized and replaced with (ASCII 29, the 'group separator'), - which is decoded by the IDE with 'NewlineifyErrorString' back into newlines, so that multi-line errors can be displayed in QuickInfo - - - - - Newlines are recognized and replaced with (ASCII 29, the 'group separator'), - which is decoded by the IDE with 'NewlineifyErrorString' back into newlines, so that multi-line errors can be displayed in QuickInfo - - - - - Creates a diagnostic, e.g. for reporting from an analyzer - - - - - Represents a diagnostic produced by the F# compiler - - - - - Supported kinds of diagnostics by this service. - - - - - For activities following the dotnet distributed tracing concept - https://learn.microsoft.com/dotnet/core/diagnostics/distributed-tracing-concepts?source=recommendations - - - - - For activities following the dotnet distributed tracing concept - https://learn.microsoft.com/dotnet/core/diagnostics/distributed-tracing-concepts?source=recommendations - - - - - Argument identifier range within signature file - - - - - Argument name in signature file - - - - - Argument identifier range within implementation file - - - - - Argument name in implementation file - - - - - Additional data for 'argument names in the signature and implementation do not match' diagnostic - - - - - Represents F# value in signature file - - - - - Represents F# value in implementation file - - - - - Additional data for diagnostics about a value whose declarations differ in signature and implementation - - - - - Represents F# field in signature file - - - - - Represents F# field in implementation file - - - - - Additional data for diagnostics about a field whose declarations differ in signature and implementation - - - - - Represents F# type of the expression - - - - - Additional data for 'This expression is a function value, i.e. is missing arguments' diagnostic - - - - - Represents F# type expected in the current context - - - - - Represents the information needed to format types - - - - - The context in which the type mismatch was found - - - - - Represents F# type type actual in the current context - - - - - Additional data for type-mismatch-like (usually with ErrorNumber = 1) diagnostics - - - - - Contextually-relevant data to each particular diagnostic - - - - - The type equation comes from a sequence expression - - - - - The type equation comes from a pattern match guard - - - - - The type equation comes from a return type of a pattern match clause (not the first clause) - - - - - The type equation comes from an downcast where a upcast could be used - - - - - The type equation comes from a runtime type test - - - - - The type equation comes from a yield in a computation expression - - - - - The type equation comes from a return in a computation expression - - - - - The type equation comes from a list or array constructor - - - - - The type equation comes from the verification of a tuple in record fields - - - - - The type equation comes from the verification of record fields - - - - - The type equation comes from a type check of the result of an else branch - - - - - The type equation comes from an omitted else branch - - - - - The type equation comes from an IF expression - - - - - No context was given - - - - - Information about the context of a type equation in type-mismatch-like diagnostic - - - - - Given a set of names, uses and a string representing an unresolved identifier, - returns a list of suggested names if there are any feasible candidates. - - - - - Given a DiagnosticKind, returns the string representing the error message for that diagnostic. - - - - - Exposes compiler diagnostic error messages. - - - - - Create a tokenizer for a line of this source file - - - - - Create a tokenizer for a line of this source file using a buffer filler - - - - - Create a tokenizer for a source file. - - - - - Tokenizer for a source file. Holds some expensive-to-compute resources at the scope of the file. - - - - - Scan one token from the line - - - - - Get a default lexer state for a color state. - - NOTE: This may result in an inaccurate lexer state - not taking into account things such as the #if/#endif and string interpolation context - within the file - - - - - Get the color state from the lexer state - - - - - Object to tokenize a line of F# source code, starting with the given lexState. The lexState should be FSharpTokenizerLexState.Initial 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. FSharpTokenColorKind and FSharpTokenCharKind. 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. - - - - - The full length consumed by this match, including delayed tokens (which can be ignored in naive lexers) - - - - - Provides additional information about the token - - - - - The tag is an integer identifier for the token - - - - - Actions taken when the token is typed - - - - - Gives an indication of the class to assign to the token an IDE - - - - - Right column of the token. - - - - - Left column of the token. - - - - - Information about a particular token from the tokenizer - - - - - Gives an indication of the class to assign to the characters of the token an IDE - - - - - Gives an indication of what should happen when the token is typed in an IDE - - - - - Gives an indication of the color class to assign to the token an IDE - - - - - Represents stable information for the state of the lexing engine at the end of a line - - - - - Represents encoded information for the end-of-line continuation of lexing - - - - - All the keywords in the F# language - - - - - A lookup from keywords to their descriptions - - - - - Keywords paired with their descriptions. Used in completion and quick info. - - - - - Add backticks if the identifier is a keyword. - Remove backticks if present and not needed. - - - - - Indicates the token is keyword `new` - - - - - Indicates the token is keyword `with` in #light - - - - - Indicates the token is keyword `with` - - - - - Indicates the token is keyword `try` - - - - - Indicates the token is keyword `class` - - - - - Indicates the token is keyword `struct` - - - - - Indicates the token is keyword `else` - - - - - Indicates the token is keyword `then` - - - - - Indicates the token is keyword `function` - - - - - Indicates the token is keyword `do` - - - - - Indicates the token is keyword `begin` - - - - - Indicates the token is a line comment - - - - - Indicates the token is a comment - - - - - Indicates the token is a whitespace - - - - - Indicates the token is a `"` - - - - - Indicates the token is a `<-` - - - - - Indicates the token is a `->` - - - - - Indicates the token is a `||` - - - - - Indicates the token is a `:=` - - - - - Indicates the token is a `~` - - - - - Indicates the token is a `@@` - - - - - Indicates the token is a `::` - - - - - Indicates the token is a `|` - - - - - Indicates the token is a `|` - - - - - Indicates the token is a `:?` - - - - - Indicates the token is a `:?>` - - - - - Indicates the token is a `:>` - - - - - Indicates the token is a `_` - - - - - Indicates the token is a `..` - - - - - Indicates the token is a `..^` - - - - - Indicates the token is a `..` - - - - - Indicates the token is a `..` - - - - - Indicates the token is a `.` - - - - - Indicates the token is a `,` - - - - - Indicates the token is a `;` - - - - - Indicates the token is a `=` - - - - - Indicates the token is a `:` - - - - - Indicates the token is a `?` - - - - - Indicates the token is a `^` - - - - - Indicates the token is a `%` - - - - - Indicates the token is a `%` - - - - - Indicates the token is a `*` - - - - - Indicates the token is a `-` - - - - - Indicates the token is a `+` or `-` - - - - - Indicates the token is a `|]` - - - - - Indicates the token is a `[|` - - - - - Indicates the token is a `>` - - - - - Indicates the token is a `<` - - - - - Indicates the token is a `>]` - - - - - Indicates the token is a `[<` - - - - - Indicates the token is a `}` - - - - - Indicates the token is a `{` - - - - - Indicates the token is a `]` - - - - - Indicates the token is a `[` - - - - - Indicates the token is a `)` - - - - - Indicates the token is a `(` - - - - - Indicates the token is a part of an interpolated string - - - - - Indicates the token is a part of an interpolated string - - - - - Indicates the token is a part of an interpolated string - - - - - Indicates the token is a part of an interpolated string - - - - - Indicates the token is a string (synonym for FSharpTokenTag.String) - - - - - Indicates the token is an identifier (synonym for FSharpTokenTag.Identifier) - - - - - Indicates the token is a string - - - - - Indicates the token is an identifier - - - - - Some of the values in the field FSharpTokenInfo.Tag - - - - - A parsed signature file - - - - - A parsed implementation file - - - - - Gets the #nowarn and other scoped pragmas - - - - - Gets the syntax range of this construct - - - - - Gets the qualified name used to help match signature and implementation files - - - - - Gets a set of all identifiers used in this parsed input. Only populated if captureIdentifiersWhenParsing option was used. - - - - - Gets the file name for the parsed input - - - - - Represents the syntax tree for a parsed implementation or signature file - - - - - Represents the full syntax tree, file name and other parsing information for a signature file - - - - - Represents the full syntax tree, file name and other parsing information for an implementation file - - - - - The name of the file - - - - - Gets the syntax range of this construct - - - - - The identifier for the name of the file - - - - - Represents a qualifying name for anonymous module specifications and implementations, - - - - - A pragma to turn a warning off - - - - - Represents a scoped pragma - - - - - Represents a parsed signature file made up of fragments - - - - - Represents a parsed implementation file made up of fragments - - - - - Represents a parsed syntax tree for an F# Interactive interaction - - - - - A signature file namespace fragment - - - - - A signature file which is a module, 'module N' - - - - - A signature file which is an anonymous module, e.g. the signature file for the final file in an application - - - - - Represents the syntax tree for the contents of a parsed signature file - - - - - An implementation file fragment which declares a namespace fragment - - - - - An implementation file is a named module definition, 'module N' - - - - - An implementation file which is an anonymous module definition, e.g. a script - - - - - Represents the syntax tree for the contents of a parsed implementation file - - - - - Represents a parsed hash directive - - - - - Gets the syntax range of this construct - - - - - Represents a parsed hash directive argument - - - - - Gets the syntax range of this construct - - - - - Represents the definition of a module or namespace in a signature file - - - - - Gets the syntax range of this construct - - - - - Represents the definition of a module or namespace - - - - - A namespace is declared 'global' - - - - - A namespace is explicitly declared - - - - - A module is anonymously named, e.g. a script - - - - - A module is explicitly named 'module N' - - - - - Indicates if this is a module definition - - - - - Represents the kind of a module or namespace definition - - - - - A namespace fragment within a namespace in a signature file - - - - - A hash directive within a module or namespace in a signature file - - - - - An 'open' definition within a module or namespace in a signature file - - - - - An exception definition within a module or namespace in a signature file - - - - - A set of one or more type definitions within a module or namespace in a signature file - - - - - A 'val' definition within a module or namespace in a signature file, corresponding - to a 'let' definition in the implementation - - - - - A nested module definition within a module or namespace in a signature file - - - - - A module abbreviation definition within a module or namespace in a signature file - - - - - Gets the syntax range of this construct - - - - - Represents a definition within a module or namespace in a signature file - - - - - Represents the right hand side of an exception definition in a signature file - - - - - A 'open type' declaration - - - - - A 'open' declaration - - - - - Gets the syntax range of this construct - - - - - Represents the target of the open declaration - - - - - A namespace fragment within a module - - - - - A hash directive within a module - - - - - An attribute definition within a module, for assembly and .NET module attributes - - - - - An 'open' definition within a module - - - - - An 'exception' definition within a module - - - - - One or more 'type' definitions within a module - - - - - An 'expr' within a module. - - - - - A 'let' definition within a module - - - - - A nested module definition 'module X = ...' - - - - - A module abbreviation definition 'module X = A.B.C' - - - - - Gets the syntax range of this construct - - - - - Represents a definition within a module - - - - - An auto-property definition, F# syntax: 'member val X = expr' - - - - - A nested type definition, a feature that is not implemented - - - - - A 'val' definition within a class - - - - - An 'inherit' definition within a class - - - - - An interface implementation definition within a class - - - - - An abstract slot definition within a class or interface - - - - - A 'let' definition within a class - - - - - An implicit inherit definition, 'inherit <typ>(args...) as base' - - - - - An implicit constructor definition - - - - - A 'member' definition with get/set accessors within a type - - - - - A 'member' definition within a type - - - - - An 'open' definition within a type - - - - - Gets the syntax range of this construct - - - - - Represents a definition element within a type definition, e.g. 'member ... ' - - - - - Gets the syntax range of this construct - - - - - Represents a type or exception declaration 'type C = ... ' plus - any additional member definitions for the type - - - - - An exception definition - - - - - A simple type definition (record, union, abbreviation) - - - - - An object model type definition (class or interface) - - - - - Gets the syntax range of this construct - - - - - Represents the right hand side of a type or exception declaration 'type C = ... ' plus - any additional member definitions for the type - - - - - Gets the syntax range of this construct - - - - - Represents the right hand side of an exception declaration 'exception E = ... ' plus - any member definitions for the exception - - - - - Gets the syntax range of this construct - - - - - Represents the right hand side of an exception declaration 'exception E = ... ' - - - - - Represents the syntactic elements associated with the "return" of a function or method. - - - - - Represents the names and other metadata for the type parameters for a member or function - - - - - Represents the argument names and other metadata for a parameter for a member or function - - - - - SynValInfo(curriedArgInfos, returnInfo) - - - - - The argument names and other metadata for a member or function - - - - - Represents the syntax tree for a 'val' definition in an abstract slot or a signature file - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree associated with the name of a type definition or module - in signature or implementation. - - This includes the name, attributes, type parameters, constraints, documentation and accessibility - for a type definition or module. For modules, entries such as the type parameters are - always empty. - - - - - Represents the syntax tree for a field declaration in a record or class - - - - - The information for a type definition in a signature - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for a type definition in a signature - - - - - Indicates the right right-hand-side is a record, union or other simple type. - - - - - Indicates the right right-hand-side is a class, struct, interface or other object-model type - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for the right-hand-side of a type definition in a signature. - Note: in practice, using a discriminated union to make a distinction between - "simple" types and "object oriented" types is not particularly useful. - - - - - Full type spec given by 'UnionCase: ty1 * tyN -> rty'. Only used in FSharp.Core, otherwise a warning. - - - - - Normal style declaration - - - - - Represents the syntax tree for the right-hand-side of union definition, excluding members, - in either a signature or implementation. - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for one case in a union definition. - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for one case in an enum definition. - - - - - An exception definition, "exception E = ..." - - - - - An abstract definition, "type X" - - - - - A type abbreviation, "type X = A.B.C" - - - - - A type defined by using an IL assembly representation. Only used in FSharp.Core. - - F# syntax: "type X = (# "..."#) - - - - - An object oriented type definition. This is not a parse-tree form, but represents the core - type representation which the type checker splits out from the "ObjectModel" cases of type definitions. - - - - - A record type definition, type X = { A: int; B: int } - - - - - An enum type definition, type X = A = 1 | B = 2 - - - - - A union type definition, type X = A | B - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for the core of a simple type definition, in either signature - or implementation. - - - - - Represents the kind of a type definition whether explicit or inferred - - - - - A nested type definition in a signature file (an unimplemented feature) - - - - - A 'val' definition in a type in a signature file - - - - - An 'inherit' definition in a type in a signature file - - - - - An interface definition in a type in a signature file - - - - - A member definition in a type in a signature file - - - - - Gets the syntax range of this construct - - - - - Represents the syntax tree for a member signature (used in signature files, abstract member declarations - and member constraints) - - - - - An artificial member kind used prior to the point where a - get/set property is split into two distinct members. - - - - - The member kind is property setter - - - - - The member kind is property getter - - - - - The member kind is not yet determined - - - - - The member is a object model constructor - - - - - The member is a class initializer - - - - - Note the member kind is actually computed partially by a syntax tree transformation in tc.fs - - - - - The kind of the member - - - - - The member was generated by the compiler - - - - - The member is 'final' - - - - - The member is an 'override' or explicit interface implementation - - - - - The member is a dispatch slot - - - - - The member is an instance member (non-static) - - - - - Represents the flags for a 'member' declaration - - - - - Represents the return information in a binding for a 'let' or 'member' declaration - - - - - Represents a binding for a 'let' or 'member' declaration - - - - - Is only populated during type-checking when an property has both a getter and setter. - It is used to track the fact that the getter and setter are part of the same property when they are desugared. - - - - - Represents extra information about the declaration of a value - - - - - The syntax range of the list of attributes - - - - - The list of attributes - - - - - List of attributes enclosed in [< ... >]. - - - - - The syntax range of the attribute - - - - - Is this attribute being applied to a property getter or setter? - - - - - Target specifier, e.g. "assembly", "module", etc. - - - - - The argument of the attribute, perhaps a tuple - - - - - The name of the type for the attribute - - - - - Represents an attribute - - - - - Gets the syntax range of part of this construct - - - - - Gets the syntax range of this construct - - - - - Represents a clause in a 'match' expression - - - - - Represents a set of bindings that implement an interface - - - - - A pattern arising from a parse error - - - - - Used internally in the type checker - - - - - &lt;@ expr @&gt;, used for active pattern arguments - - - - - A type test pattern ':? type ' - - - - - '?id' -- for optional argument names - - - - - The 'null' pattern - - - - - A record pattern - - - - - An array or a list as a pattern - - - - - A parenthesized pattern - - - - - A tuple pattern - - - - - A long identifier pattern possibly with argument patterns - - - - - A conjunctive pattern 'pat1 as pat2' - - - - - A conjunctive pattern 'pat1 & pat2' - - - - - A conjunctive pattern 'pat1 :: pat2' - - - - - A disjunctive pattern 'pat1 | pat2' - - - - - An attributed pattern, used in argument or declaration position - - - - - A typed pattern 'pat : type' - - - - - A name pattern 'ident' - - - - - A wildcard '_' in a pattern - - - - - A constant in a pattern - - - - - Gets the syntax range of this construct - - - - - Represents a syntax tree for an F# pattern - - - - - Represents a syntax tree for arguments patterns - - - - - Represents a simple set of variable bindings a, (a, b) or (a: Type, b: Type) at a lambda, - function definition or other binding point, after the elimination of pattern matching - from the construct, e.g. after changing a "function pat1 -> rule1 | ..." to a - "fun v -> match v with ..." - - - - - A static optimization conditional that activates for a struct - - - - - A static optimization conditional that activates for a particular type instantiation - - - - - Represents a syntax tree for a static optimization constraint in the F# core library - - - - - We have decided to use an alternative name in the pattern and related expression - - - - - We have not decided to use an alternative name in the pattern and related expression - - - - - Represents the alternative identifier for a simple pattern - - - - - An attributed simple pattern - - - - - A type annotated simple pattern - - - - - Indicates a simple pattern variable. - - altNameRefCell: - Normally 'None' except for some compiler-generated variables in desugaring pattern matching. - Pattern processing sets this reference for hidden variable introduced - by desugaring pattern matching in arguments. The info indicates an - alternative (compiler generated) identifier to be used because the - name of the identifier is already bound. - - isCompilerGenerated: true if a compiler generated name - isThisVal: true if 'this' variable in member - isOptional: true if a '?' is in front of the name - - - - - Represents a syntax tree for simple F# patterns - - - - - F# syntax: f?x - - - - - Debug points arising from computation expressions - - - - - F# syntax: interpolated string, e.g. "abc{x}" or "abc{x,3}" or "abc{x:N4}" - Note the string ranges include the quotes, verbatim markers, dollar sign and braces - - - - - 'use x = fixed expr' - - - - - Inserted for error recovery when there is "expr." and missing tokens or error recovery after the dot - - - - - Inserted for error recovery - - - - - Inserted for error recovery - - - - - Only used in FSharp.Core - - - - - Only used in FSharp.Core - - - - - Only used in FSharp.Core - - - - - Only used in FSharp.Core - - - - - F# syntax: 'while! ... do ...' - - - - - F# syntax: do! expr - Computation expressions only - - - - - F# syntax: match! expr with pat1 -> expr | ... | patN -> exprN - - - - - F# syntax: let! pat = expr in expr - F# syntax: use! pat = expr in expr - F# syntax: let! pat = expr and! ... and! ... and! pat = expr in expr - Computation expressions only - - - - - F# syntax: yield! expr - F# syntax: return! expr - Computation expressions only - - - - - F# syntax: yield expr - F# syntax: return expr - Computation expressions only - - - - - Used internally during type checking for translating computation expressions. - - - - - Used in parser error recovery and internally during type checking for translating computation expressions. - - - - - F# syntax: ... in ... - Computation expressions only, based on JOIN_IN token from lex filter - - - - - F# syntax: ((type1 or ... or typeN): (member-dig) expr) - - - - - F# syntax: &expr, &&expr - - - - - F# syntax: null - - - - - F# syntax: downcast expr - - - - - F# syntax: upcast expr - - - - - F# syntax: expr :?> type - - - - - F# syntax: expr :> type - - - - - F# syntax: expr :? type - - - - - F# syntax: expr.Items (e1) <- e2, rarely used named-property-setter notation, e.g. (stringExpr).Chars(3) <- 'a' - - - - - F# syntax: Type.Items(e1) <- e2, rarely used named-property-setter notation, e.g. Foo.Bar.Chars(3) <- 'a' - - - - - F# syntax: expr.[expr, ..., expr] <- expr - - - - - F# syntax: expr.[expr, ..., expr] - - - - - F# syntax: expr <- expr - - - - - F# syntax: expr.ident...ident <- expr - - - - - F# syntax: _.ident.ident - - - - - F# syntax: expr.ident.ident - - - - - F# syntax: ident.ident...ident <- expr - - - - - F# syntax: ident.ident...ident - - isOptional: true if preceded by a '?' for an optional named parameter - altNameRefCell: Normally 'None' except for some compiler-generated - variables in desugaring pattern matching. See SynSimplePat.Id - - - - - F# syntax: ident - Optimized representation for SynExpr.LongIdent (false, [id], id.idRange) - - - - - F# syntax: 'T (for 'T.ident). - - - - - F# syntax: if expr then expr - F# syntax: if expr then expr else expr - - - - - F# syntax: expr; expr - - isTrueSeq: false indicates "let v = a in b; v" - - - - - F# syntax: lazy expr - - - - - F# syntax: try expr finally expr - - - - - F# syntax: try expr with pat -> expr - - - - - F# syntax: let pat = expr in expr - F# syntax: let f pat1 .. patN = expr in expr - F# syntax: let rec f pat1 .. patN = expr in expr - F# syntax: use pat = expr in expr - - - - - F# syntax: expr<type1, ..., typeN> - - - - - F# syntax: f x - - flag: indicates if the application is syntactically atomic, e.g. f.[1] is atomic, but 'f x' is not - isInfix is true for the first app of an infix operator, e.g. 1+2 - becomes App(App(+, 1), 2), where the inner node is marked isInfix - - - - - F# syntax: assert expr - - - - - F# syntax: do expr - - - - - F# syntax: match expr with pat1 -> expr | ... | patN -> exprN - - - - - F# syntax: function pat1 -> expr | ... | patN -> exprN - - - - - 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 - parsedData keeps original parsed patterns and expression, - prior to transforming to "simple" patterns and iterated lambdas - - F# syntax: fun pat -> expr - - - - - F# syntax: { expr } - - - - - F# syntax: ^expr, used for from-end-of-collection indexing and ^T.Operation - - - - - F# syntax: expr.. - F# syntax: ..expr - F# syntax: expr..expr - F# syntax: * - A two-element range indexer argument a..b, a.., ..b. Also used to represent - a range in a list, array or sequence expression. - - - - - F# syntax: [ expr ], [| expr |] - - - - - F# syntax: 'for ... in ... do ...' - - - - - F# syntax: 'for i = ... to ... do ...' - - - - - F# syntax: 'while ... do ...' - - - - - F# syntax: { new ... with ... } - - - - - F# syntax: new C(...) - The flag is true if known to be 'family' ('protected') scope - - - - - F# syntax: { f1=e1; ...; fn=en } - inherit includes location of separator (for tooling) - copyOpt contains range of the following WITH part (for tooling) - every field includes range of separator after the field (for tooling) - - - - - F# syntax: [ e1; ...; en ], [| e1; ...; en |] - - - - - F# syntax: {| id1=e1; ...; idN=eN |} - F# syntax: struct {| id1=e1; ...; idN=eN |} - - - - - F# syntax: e1, ..., eN - - - - - F# syntax: expr: type - - - - - F# syntax: 1, 1.3, () etc. - - - - - F# syntax: <@ expr @>, <@@ expr @@> - - Quote(operator, isRaw, quotedSynExpr, isFromQueryExpression, m) - - - - - F# syntax: (expr) - - Parenthesized expressions. Kept in AST to distinguish A.M((x, y)) - from A.M(x, y), among other things. - - - - - Attempt to get the range of the first token or initial portion only - this - is ad-hoc, just a cheap way to improve a certain 'query custom operation' error range - - - - - Gets the syntax range of this construct - - - - - Indicates if this expression arises from error recovery - - - - - Represents a syntax tree for F# expressions - - - - - F# syntax: x: #I1 & #I2 - F# syntax: x: 't & #I1 & #I2 - Shorthand for x: 't when 't :> I1 and 't :> I2 - - - - - A type arising from a parse error - - - - - F# syntax: ^a or ^b, used in trait calls - - - - - F# syntax: a: b, used in signatures and type annotations - - - - - F# syntax: ident=1 etc., used in static parameters to type providers - - - - - F# syntax: const expr, used in static parameters to type providers - - - - - F# syntax: 1, "abc" etc, used in parameters to type providers - For the dimensionless units i.e. 1, and static parameters to provided types - - - - - F# syntax: for units of measure e.g. m^3, kg^1/2 - - - - - F# syntax: #type - - - - - F# syntax: typ with constraints - - - - - F# syntax: _ - - - - - F# syntax: 'Var - - - - - F# syntax: type -> type - - - - - F# syntax: type[] - - - - - F# syntax: {| id: type; ...; id: type |} - F# syntax: struct {| id: type; ...; id: type |} - - - - - F# syntax: type * ... * type - F# syntax: struct (type * ... * type) - - - - - F# syntax: type.A.B.C<type, ..., type> - - - - - F# syntax: type<type, ..., type> or type type or (type, ..., type) type - isPostfix: indicates a postfix type application e.g. "int list" or "(int, string) dict" - - - - - F# syntax: A.B.C - - - - - Gets the syntax range of this construct - - - - - Represents a syntax tree for F# types - - - - - List of type parameter declarations with optional type constraints, - enclosed in `< ... >` (postfix) or `( ... )` (prefix), or a single prefix parameter. - - - - - F# syntax is SomeThing<'T> - - - - - F# syntax is 'typar: delegate<'Args, unit> - - - - - F# syntax is 'typar: enum<'UnderlyingType> - - - - - F# syntax is ^T: (static member MemberName: ^T * int -> ^T) - - - - - F# syntax is 'typar :> type - - - - - F# syntax is default ^T: type - - - - - F# syntax is 'typar: equality - - - - - F# syntax is 'typar: comparison - - - - - F# syntax is 'typar: null - - - - - F# syntax is 'typar: unmanaged - - - - - F# syntax: is 'typar: not struct - - - - - F# syntax: is 'typar: struct - - - - - The unchecked abstract syntax tree of F# type constraints - - - - - Represents the explicit declaration of a type parameter - - - - - A 'do' binding in a module. Must have type 'unit' - - - - - A normal 'let' binding in a module - - - - - A standalone expression in a module - - - - - The kind associated with a binding - "let", "do" or a standalone expression - - - - - Indicates if an expression is an atomic expression. - - An atomic expression has no whitespace unless enclosed in parentheses, e.g. - 1, "3", ident, ident.[expr] and (expr). If an atomic expression has type T, - then the largest expression ending at the same range as the atomic expression - also has type T. - - - - - Represents a record field name plus a flag indicating if given record field name is syntactically - correct and can be used in name resolution. - - - - - Represents the location of the separator block + optional position - of the semicolon (used for tooling support) - - - - - Indicates if a for loop is 'for x in e1 -> e2', only valid in sequence expressions - - - - - Indicates if a for loop is 'for x in e1 -> e2', only valid in sequence expressions - - - - - Represents whether a debug point should be present for a 'let' binding, - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'while' in a 'while...' loop, - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'in' or 'to' of a 'for...' loop, - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'for' in a 'for...' loop, - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'finally' in a 'try .. finally', - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for the 'with' in a 'try .. with', - that is whether the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be present for a 'try', that is whether - the construct corresponds to a debug point in the original source. - - - - - Represents whether a debug point should be suppressed for either the - first or second part of a sequential execution, that is whether the - construct corresponds to a debug point in the original source. - - - - - Represents a debug point at a leaf expression (e.g. an application or constant). - - - - - Represents whether a debug point should be present for the target - of a decision tree, that is whether the construct corresponds to a debug - point in the original source. - - - - - A construct marked or assumed 'private' - - - - - A construct marked or assumed 'internal' - - - - - A construct marked or assumed 'public' - - - - - Represents an accessibility modifier in F# syntax - - - - - Represents an unchecked syntax tree of F# unit of measure exponents. - - - - - A parenthesized measure - - - - - A variable unit of measure - - - - - An anonymous (inferred) unit of measure - - - - - The '1' unit of measure - - - - - A power of a unit of measure, e.g. 'kg ^ 2' - - - - - A division of two units of measure, e.g. 'kg / m' - - - - - A sequence of several units of measure, e.g. 'kg m m' - - - - - A product of two units of measure, e.g. 'kg * m' - - - - - A named unit of measure - - - - - Represents an unchecked syntax tree of F# unit of measure annotations. - - - - - Source Line, File, and Path Identifiers - Containing both the original value as the evaluated value. - - - - - Old comment: "we never iterate, so the const here is not another SynConst.Measure" - - - - - Used internally in the typechecker once an array of unit16 constants - is detected, to allow more efficient processing of large arrays of uint16 constants. - - - - - F# syntax: verbatim or regular byte string, e.g. "abc"B. - - Also used internally in the typechecker once an array of unit16 constants - is detected, to allow more efficient processing of large arrays of uint16 constants. - - - - - F# syntax: verbatim or regular string, e.g. "abc" - - - - - UserNum(value, suffix) - - F# syntax: 1Q, 1Z, 1R, 1N, 1G - - - - - F# syntax: 23.4M - - - - - F# syntax: 'a' - - - - - F# syntax: 1.30, 1.40e10 etc. - - - - - F# syntax: 1.30f, 1.40e10f etc. - - - - - F# syntax: 13un - - - - - F# syntax: 13n - - - - - F# syntax: 13UL - - - - - F# syntax: 13L - - - - - F# syntax: 13u, 0x4000u, 0o0777u - - - - - F# syntax: 13, 0x4000, 0o0777 - - - - - F# syntax: 13us, 0x4000us, 0o0777us, 0b0111101us - - - - - F# syntax: 13s, 0x4000s, 0o0777s, 0b0111101s - - - - - F# syntax: 13uy, 0x40uy, 0oFFuy, 0b0111101uy - - - - - F# syntax: 13y, 0xFFy, 0o077y, 0b0111101y - - - - - F# syntax: true, false - - - - - F# syntax: () - - - - - Gets the syntax range of this construct - - - - - The unchecked abstract syntax tree of constants in F# types and expressions. - - - - - Indicate if the byte string had a special format - - - - - Indicate if the string had a special format - - - - - Gets the syntax range of this construct - - - - - Represents a syntactic type parameter - - - - - The construct is a statically inferred type inference variable '^T' - - - - - The construct is a normal type inference variable - - - - - Represents whether a type parameter has a static requirement or not (^T or 'T) - - - - - The construct arises from error recovery - - - - - The construct arises normally - - - - - Indicates if the construct arises from error recovery - - - - - Get the trivia of the idents - - - - - Indicates if the construct ends in '.' due to error recovery - - - - - Gets the syntax range for part of this construct - - - - - Gets the syntax range of this construct - - - - - Get the long ident for this construct - - - - - Get the idents with potential trivia attached - - - - - Get the dot ranges - - - - - Represents a long identifier with possible '.' at end. - - Typically dotRanges.Length = lid.Length-1, but they may be same if (incomplete) code ends in a dot, e.g. "Foo.Bar." - The dots mostly matter for parsing, and are typically ignored by the typechecker, but - if dotRanges.Length = lid.Length, then the parser must have reported an error, so the typechecker is allowed - more freedom about typechecking these expressions. - LongIdent can be empty list - it is used to denote that name of some AST element is absent (i.e. empty type name in inherit) - - - - - Represents a long identifier e.g. 'A.B.C' - - - - - Represents an identifier with potentially additional trivia information. - - - - - Represents an identifier in F# code - - - - - Controls the behavior when a SynExpr is reached; it can just do - defaultTraverse(expr) if you have no special logic for this node, and want the default processing to pick which sub-node to dive deeper into - or can inject non-default behavior, which might incorporate: - traverseSynExpr(subExpr) to recurse deeper on some particular sub-expression based on your own logic - path helps to track AST nodes that were passed during traversal - - - - - Used to track route during traversal of syntax using SyntaxTraversal.Traverse - - - - - Keywords paired with their descriptions. Used in completion and quick info. - - - - - Indicates a ValRef generated to facilitate tuple eliminations - - - - - Mark some variables (the ones we introduce via abstractBigTargets) as don't-eliminate - - - - - The prefix of the names used for the fake namespace path added to all dynamic code entries in FSI.EXE - - - - - Reuses generated exception field name objects for common field numbers - - - - - Reuses generated union case field name objects for common field numbers - - - - - Mangle the static parameters for a provided type or method - - - - - Mangle the static parameters for a provided type or method - - - - - Try to chop "get_" or "set_" from a string. - If the string does not start with "get_" or "set_", this function raises an exception. - - - - - Try to chop "get_" or "set_" from a string - - - - - Is this character a part of a long identifier? - - - - - The characters that are allowed to be in an identifier. - - - - - The characters that are allowed to be the first character of an identifier. - - - - - Like ConvertValLogicalNameToDisplayName but produces a tagged layout - - - - - Like ConvertLogicalNameToDisplayName but produces a tagged layout - - - - - Take a core display name for a value (e.g. op_Addition or PropertyName) and convert it to display text - Foo --> Foo - + --> ``+`` - op_Addition --> (+) - op_Multiply --> ( * ) - op_DereferencePercent --> (!%) - A-B --> ``A-B`` - |A|_| --> (|A|_|) - let --> ``let`` - type --> ``type`` - params --> ``params`` - base --> base - or --> or - mod --> mod - - - - - Converts the logical name for and operator back into the core of a display name. For example: - Foo --> Foo - + --> + - op_Addition --> + - op_DereferencePercent --> !% - A-B --> A-B - |A|_| --> |A|_| - base --> base regardless of IsBaseVal - Used on names of all kinds - - TODO: We should assess uses of this function. - - In any cases it is used it probably indicates that text is being - generated which: - 1. does not contain double-backticks for non-identifiers - 2. does not put parentheses arounf operators or active pattern names - - If the text is immediately in quotes, this is generally ok, e.g. - - error FS0038: '+' is bound twice in this pattern - error FS0038: '|A|_|' is bound twice in this pattern - error FS0038: 'a a' is bound twice in this pattern - - If not, the it is likely this should be replaced by ConvertValLogicalNameToDisplayName. - - - - - Take a core display name (e.g. "List" or "Strange module name") and convert it to display text - by adding backticks if necessary. - Foo --> Foo - + --> ``+`` - A-B --> ``A-B`` - - - - - Converts the core of an operator name into a logical name. For example, - + --> op_Addition - !% --> op_DereferencePercent - Only used on actual operator names - - - - - Is the name a logical operator name, including unary, binary and ternary operators - op_UnaryPlus - yes - op_Addition - yes - op_Range - yes (?) - op_RangeStep - yes (?) - op_DynamicAssignment - yes - op_Quack - no - + - no - ABC - no - ABC DEF - no - base - no - |A|_| - no - - - - - Adds double backticks if necessary to make a valid identifier, e.g. - op_Addition --> op_Addition - + --> ``+`` (this is not op_Addition) - |>> --> ``|>>`` (this is not an op_) - A-B --> ``A-B`` - AB --> AB - |A|_| --> |A|_| this is an active pattern name, needs parens not backticks - Removes double backticks if not necessary to make a valid identifier, e.g. - ``A`` --> A - ``A-B`` --> ``A-B`` - - - - - Determines if the specified name is a valid name for an active pattern. - |A|_| --> true - |A|B| --> true - |A| --> true - | --> false - || --> false - op_Addition --> false - - TBD: needs unit testing - - - - - Is the name a valid F# identifier, primarily used internally in PrettyNaming.fs for determining if an - identifier needs backticks. - - In general do not use this routine. It is only used in one quick fix, for determining if it is valid - to add "_" in front of an identifier. - - A --> true - A' --> true - _A --> true - A0 --> true - |A|B| --> false - op_Addition --> true - + --> false - let --> false - base --> false - - TBD: needs unit testing - - - - - Returns `true` if given string is an operator display name, e.g. - ( |>> ) - |>> - .. - - - - - Prefix for compiled (mangled) operator names. - - - - - Some general F# utilities for mangling / unmangling / manipulating names. - Anything to do with special names of identifiers and other lexical rules - - - - - A kind that determines what range in a source's text is semantically classified as after type-checking. - - - - - A builder that will build an semantic classification key store based on the written Item and its associated range. - - - - - Get a read only view on the semantic classification key store - - - - - Stores a list of semantic classification key strings and their ranges in a memory mapped file. - Provides a view to iterate over the contents of the file. - - - - - Iterate through the stored SemanticClassificationItem entries from the store and apply the passed function on each entry. - - - - - Provides a read only view to iterate over the semantic classification contents. - - - - - The methods (or other items) in the group - - - - - The shared name of the methods (or other items) in the group - - - - - Represents a group of methods (or other items) returned by GetMethods. - - - - - The documentation for the item - - - - - Does the type name or method support a static arguments list, like TP<42,"foo"> or conn.CreateCommand<42, "foo">(arg1, arg2)? - - - - - The tagged text for the return type for the method (or other item) - - - - - The parameters of the method in the overload set - - - - - Does the method support an arguments list? This is always true except for static type instantiations like TP<42,"foo">. - - - - - Does the method support a params list arg? - - - - - The description representation for the method (or other item) - - - - - Represents one method (or other item) in a method group. The item may represent either a method or - a single, non-overloaded item such as union case or a named function value. - - - - - The name of the parameter. - - - - - Is the parameter optional - - - - - The representation for the parameter including its name, its type and visual indicators of other - information such as whether it is optional. - - - - - A key that can be used for sorting the parameters, used to help sort overloads. - - - - - Represents one parameter for one method (or other item) in a group. - - - - - Represents a set of declarations in F# source code, with information attached ready for display by an editor. - Returned by GetDeclarations. - - - - - Get the text to display in the declaration list for the declaration. - - This is a display name without backticks. - - - - - Get the text for the declaration as it's to be inserted into source code. - - This is a display name with backticks if necessary. - - - - - Get the text to display in the declaration list for the declaration. - - This is a display name without backticks. - - - - - Get the completion kind of the item - - - - - Get the glyph to use - - - - - Get the description - - - - - Get the accessibility of the item - - - - - Represents a declaration in F# source code, with information attached ready for display by an editor. - Returned by GetDeclarations. - - - - - A list of data tip elements to display. - - - - - Information for building a tool tip box. - - - - - An error occurred formatting this element - - - - - A single type, method, etc with comment. May represent a method overload group. - - - - - A single tool tip display element - - - - - Parameter name - - - - - Extra text, goes at the end - - - - - typar instantiation text, to go after xml - - - - - A single data tip display element - - - - - The kind of container. - - - - - The name of the container or file - - - - - The fully qualified name of the container. - For files it returns empty string. - - - - - 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. - - - - - Represents top-level declarations (that should be in the type drop-down) - with nested declarations (that can be shown in the member drop-down) - - - - - Represents an item to be displayed in the navigation bar - - - - - Indicates a kind of item to show in an F# navigation bar - - - - - The locations of commas and close parenthesis (or, last char of last arg, if no final close parenthesis) - - - - - The location of the open-parentheses - - - - - Either empty or a name if an actual named parameter; f(0,a=4,?b=None) would be [|None; Some "a"; Some "b"|] - - - - - The start location of long identifier prior to the open-parentheses - - - - - The end location of long identifier prior to the open-parentheses - - - - - The text of the long identifier prior to the open-parentheses - - - - - Is false if either this is a call without parens "f x" or the parser recovered as in "f(x,y" - - - - - Array of locations for each argument, and a flag if that argument is named - - - - - Find the information about parameter info locations at a particular source location - - - - - Represents the locations relevant to activating parameter info in an IDE - - - - - Represents the location of a tupled argument, which can optionally be a named argument. - - - - - Last part of the entity's full name. - - - - - Full display name (i.e. last ident plus modules with `RequireQualifiedAccess` attribute prefixed). - - - - - Namespace that is needed to open to make the entity resolvable in the current scope. - - - - - Ident parts needed to append to the current ident to make it resolvable in current scope. - - - - - Full name, relative to the current scope. - - - - - Helper data structure representing a symbol, suitable for implementing unresolved identifiers resolution code fixes. - - - - - `ShortIdent` with a flag indicating if it's resolved in some scope. - - - - - An array of `ShortIdent`. - - - - - Short identifier, i.e. an identifier that contains no dots. - - - - - Where open statements should be added. - - - - - Current position (F# compiler line number). - - - - - Current scope kind. - - - - - Insert open namespace context. - - - - - Kind of lexical scope. - - - - - Completing a method override (e.g. override this.ToStr|) - - - - - Completing a pattern in a match clause, member/let binding or lambda - - - - - Completing a type abbreviation (e.g. type Long = int6|) - or a single case union without a bar (type SomeUnion = Abc|) - - - - - Completing union case fields declaration (e.g. 'A of stri|' but not 'B of tex|: string') - - - - - Completing a type annotation (e.g. foo (x: |)) - Completing a type application (e.g. typeof<str| >) - - - - - Completing an attribute name, outside of the constructor - - - - - Completing named parameters\setters in parameter list of attributes\constructor\method calls - end of name ast node * list of properties\parameters that were already set - - - - - Completing records field - - - - - Completing something after the inherit keyword - - - - - Completion context cannot be determined due to errors - - - - - Any other position in a pattern that does not need special handling - - - - - Completing a record field identifier in a pattern (e.g. fun { Field1 = a; Fie| } -> ) - - - - - Completing union case field identifier in a pattern (e.g. fun (Case (field1 = a; fie| )) -> ) - - - - - Completing union case field pattern (e.g. fun (Some (Value = v| )) -> ) - - - - Completing union case field pattern (e.g. fun (Some v| ) -> ) or fun (Some (v| )) -> ). In theory, this could also be parameterized active pattern usage. - Position in the tuple. None if there is no tuple, with only one field outside of parentheses - `Some v|` - True when completing the first field in the tuple and no other field is bound - `Case (a|)` but not `Case (a|, b)` - Range of the case identifier - - - - Performs an operation on the cache in thread safe manner. - - - - - Clears the cache. - - - - - Thread safe wrapper over `IAssemblyContentCache`. - - - - - Try get an assembly cached content. - - - - - Store an assembly content. - - - - - Assembly content cache. - - - - - Assembly content. - - - - - Content type used to get assembly content. - - - - - Assembly file last write time. - - - - - `RawEntity` list retrieved from an assembly. - - - - - Cache display name and namespace, used for completion. - - - - - Function that returns `EntityKind` based of given `LookupKind`. - - - - - Parent module that has `AutoOpen` attribute. - - - - - Parent module that has the largest scope and has `RequireQualifiedAccess` attribute. - - - - - The most narrative parent module that has `RequireQualifiedAccess` attribute. - - - - - `FSharpEntity.Namespace`. - - - - - Entity name parts with removed module suffixes (Ns.M1Module.M2Module.M3.entity -> Ns.M1.M2.M3.entity) - and replaced compiled names with display names (FSharpEntity.DisplayName, FSharpValueOrFunction.DisplayName). - Note: *all* parts are cleaned, not the last one. - - - - - Full entity name as it's seen in compiled code (raw FSharpEntity.FullName, FSharpValueOrFunction.FullName). - - - - - Represents type, module, member, function or value in a compiled assembly. - - - - - Assembly path. - - - - - Entity lookup type. - - - - - All assembly content. - - - - - Public assembly content only. - - - - - Assembly content type. - - - - - Represent an Xml documentation block in source code - - - - - Indicates an external declaration was found - - - - - Indicates a declaration location was found - - - - - Indicates a declaration location was not found, with an additional reason - - - - - Represents the result of the GetDeclarationLocation operation. - - - - - Trying to find declaration of ProvidedMember without TypeProviderDefinitionLocationAttribute - - - - - Trying to find declaration of ProvidedType without TypeProviderDefinitionLocationAttribute - - - - - Source code file is not available - - - - - Generic reason: no particular information about error apart from a message - - - - - Represents the reason why the GetDeclarationLocation operation failed. - - - - - Represents a symbol in an external (non F#) assembly - - - - - Represents the type of a single method parameter - - - - - Type variable defined in non-F# assembly. - - - - - Pointer defined in non-F# assembly. - - - - - Array of type that is defined in non-F# assembly. - - - - - Type defined in non-F# assembly. - - - - - Represents a type in an external (non F#) assembly. - - - - - Position of the last dot. - - - - - The column number at the end of full partial name. - - - - - Last part of long ident. - - - - - Qualifying idents, prior to the last dot, not including the last part. - - - - - Empty partial long name. - - - - - Qualified long name. - - - - - Capture information about an interface in ASTs - - - - - Extension methods for the TcResolutions type. - - - - - Corrects insertion line number based on kind of scope and text surrounding the insertion point. - - - - - Returns long identifier at position. - - - - - Returns `InsertContext` based on current position and symbol idents. - - - - - Returns `InsertContext` based on current position and symbol idents. - - - - - A pattern that collects all sequential expressions to avoid StackOverflowException - - - - - Operations querying the entire syntax tree - - - - - Returns (possibly cached) assembly content. - - - - - Given a `FSharpAssemblySignature`, returns assembly content. - - - - - Provides assembly content. - - - - - Get the list of Xml documentation from current source code - - - - - if it's a blank XML comment with trailing "<", returns Some (index of the "<"), otherwise returns None - - - - - Tests whether the user is typing something like "member x." or "override (*comment*) x." - - - - - Get the partial long name of the identifier to the left of index. - For example, for `System.DateTime.Now` it returns PartialLongName ([|"System"; "DateTime"|], "Now", Some 32), where "32" pos of the last dot. - - - - - Get the partial long name of the identifier to the left of index. - - - - - Given a string and a position in that string, find an identifier as - expected by `GotoDefinition`. This will work when the cursor is - immediately before the identifier, within the identifier, or immediately - after the identifier. - - 'tolerateJustAfter' indicates that we tolerate being one character after the identifier, used - for goto-definition - - In general, only identifiers composed from upper/lower letters and '.' are supported, but there - are a couple of explicitly handled exceptions to allow some common scenarios: - - When the name contains only letters and '|' symbol, it may be an active pattern, so we - treat it as a valid identifier - e.g. let ( |Identity| ) a = a - (but other identifiers that include '|' are not allowed - e.g. '||' operator) - - It searches for double tick (``) to see if the identifier could be something like ``a b`` - - REVIEW: Also support, e.g., operators, performing the necessary mangling. - (i.e., I would like that the name returned here can be passed as-is - (post `.`-chopping) to `GetDeclarationLocation.) - - In addition, return the position where a `.` would go if we were making - a call to `DeclItemsForNamesAtPosition` for intellisense. This will - allow us to use find the correct qualified items rather than resorting - to the more expensive and less accurate environment lookup. - - - - - Puts us after the last character. - - - - - Methods for cheaply and inaccurately parsing F#. - - These methods are very old and are mostly to do with extracting "long identifier islands" - A.B.C - from F# source code, an approach taken from pre-F# VS samples for implementing intelliense. - - This code should really no longer be needed since the language service has access to - parsed F# source code ASTs. However, the long identifiers are still passed back to GetDeclarations and friends in the - F# Compiler Service and it's annoyingly hard to remove their use completely. - - In general it is unlikely much progress will be made by fixing this code - it will be better to - extract more information from the F# ASTs. - - It's also surprising how hard even the job of getting long identifier islands can be. For example the code - below is inaccurate for long identifier chains involving ``...`` identifiers. And there are special cases - for active pattern names and so on. - - - - - Find corresponding interface declaration at a given position - - - - - Generate stub implementation of an interface at a start column - - - - - Check whether an entity is an interface or type abbreviation of an interface - - - - - Get interface member signatures - - - - - Get associated member names and ranges. - In case of properties, intrinsic ranges might not be correct for the purpose of getting - positions of 'member', which indicate the indentation for generating new members - - - - - Check whether an interface is empty - - - - - Get members in the decreasing order of inheritance chain - - - - - TextSpan in BlockSpan - - - - - HintSpan in BlockSpan - - - - - Stores the range for a construct, the sub-range that should be collapsed for outlinging, - a tag for the construct type, and a tag for the collapse style - - - - - Tag to identify the construct that can be stored alongside its associated ranges - - - - - Collapse indicates the way a range/snapshot should be collapsed. `Same` is for a scope inside - some kind of scope delimiter, e.g. `[| ... |]`, `[ ... ]`, `{ ... }`, etc. `Below` is for expressions - following a binding or the right hand side of a pattern, e.g. `let x = ...` - - - - - Returns outlining ranges for given parsed input. - - - - - Get all unused declarations in a file - - - - - The relative name that can be applied to a simplifiable name - - - - - The range of a name that can be simplified - - - - - Data for use in finding unnecessarily-qualified names and generating diagnostics to simplify them - - - - - Get all ranges that can be simplified in a file - - - - - Get all unused open declarations in a file - - - - - Defines a write-only stream used to capture output of the hosted F# Interactive dynamic compiler. - - - - - Feeds content into the stream. - - - - - Defines a read-only input stream used to feed content to the hosted F# Interactive dynamic compiler. - - - - - Event fires when a root-level value is bound to an identifier, e.g., via `let x = ...`. - - - - - Raised when an interaction is successfully typechecked and executed, resulting in an update to the - type checking state. - - This event is triggered after parsing and checking, either via input from 'stdin', or via a call to EvalInteraction. - - - - - A host calls this to get the active language ID if provided by fsi-server-lcid - - - - - A host calls this to determine if the --gui parameter is active - - - - - The single, global interactive checker to use in conjunction with other operations - on the FsiEvaluationSession. - - If you are using an FsiEvaluationSession in this process, you should only use this InteractiveChecker - for additional checking operations. - - - - - Get all the dynamically generated assemblies - - - - - Get a handle to the resolved view of the current signature of the incrementally generated assembly. - - - - - Tries to find a root-level value that is bound to the given identifier - - - - - Load the dummy interaction, load the initial files, and, - if interacting, start the background thread to read the standard input. - - Performs these steps: - - Load the dummy interaction, if any - - Set up exception handling, if any - - Load the initial files, if any - - Start the background thread to read the standard input, if any - - Sit in the GUI event loop indefinitely, if needed - - - - - A host calls this to report an unhandled exception in a standard way, e.g. an exception on the GUI thread gets printed to stderr - - - - - Typecheck the given script fragment in the type checking context implied by the current state - of F# Interactive. The results can be used to access intellisense, perform resolutions, - check brace matching and other information. - - Operations may be run concurrently with other requests to the InteractiveChecker. - - - - - A host calls this to request an interrupt on the evaluation thread. - - - - - Get a configuration that uses a private inbuilt implementation of the 'fsi' object and does not - implicitly reference FSharp.Compiler.Interactive.Settings.dll. - - - - - Get a configuration that uses the 'fsi' object (normally from FSharp.Compiler.Interactive.Settings.dll, - an object from another DLL with identical characteristics) to provide an implementation of the configuration. - FSharp.Compiler.Interactive.Settings.dll is referenced by default. - - - - - Get a configuration that uses the 'fsi' object (normally from FSharp.Compiler.Interactive.Settings.dll, - an object from another DLL with identical characteristics) to provide an implementation of the configuration. - The flag indicates if FSharp.Compiler.Interactive.Settings.dll is referenced by default. - - - - - A host calls this to get the completions for a long identifier, e.g. in the console - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Gets the root-level values that are bound to an identifier - - - - - Format a value to a string using the current PrintDepth, PrintLength etc settings provided by the active fsi configuration object - - - - - Execute the given script. Stop on first error, discarding the rest - of the script. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the given script. Stop on first error, discarding the rest - of the script. Errors are sent to the output writer, a 'true' return value indicates there - were no errors overall. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - The scriptFileName parameter is used to report errors including this file name. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors are sent to the output writer, a 'true' return value indicates there - were no errors overall. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - The scriptFileName parameter is used to report errors including this file name. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors are sent to the output writer, a 'true' return value indicates there - were no errors overall. Execution is performed on the 'Run()' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Parsing is performed on the current thread, and execution is performed - synchronously on the 'main' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - The scriptFileName parameter is used to report errors including this file name. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors and warnings are collected apart from any exception arising from execution - which is returned via a Choice. Parsing is performed on the current thread, and execution is performed - synchronously on the 'main' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors are sent to the output writer. Parsing is performed on the current thread, and execution is performed - synchronously on the 'main' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - The scriptFileName parameter is used to report errors including this file name. - - - - - Execute the code as if it had been entered as one or more interactions, with an - implicit termination at the end of the input. Stop on first error, discarding the rest - of the input. Errors are sent to the output writer. Parsing is performed on the current thread, and execution is performed - synchronously on the 'main' thread. - - Due to a current limitation, it is not fully thread-safe to run this operation concurrently with evaluation triggered - by input from 'stdin'. - - - - Create an FsiEvaluationSession, reading from the given text input, writing to the given text output and error writers - - The dynamic configuration of the evaluation session - The command line arguments for the evaluation session - Read input from the given reader - Write errors to the given writer - Write output to the given writer - Optionally make the dynamic assembly for the session collectible - An optional resolver for legacy MSBuild references - - - - Creates a root-level value with the given name and .NET object. - If the .NET object contains types from assemblies that are not referenced in the interactive session, it will try to implicitly resolve them by default configuration. - Name must be a valid identifier. - - - - - Represents an F# Interactive evaluation session. - - - - - Thrown when there was an error compiling the given code in FSI. - - - - - Implicitly reference FSharp.Compiler.Interactive.Settings.dll - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Hook for listening for evaluation bindings - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - Called by the evaluation session to ask the host for parameters to format text for output - - - - - The evaluation session calls this at an appropriate point in the startup phase if the --fsi-server parameter was given - - - - - The evaluation session calls this to report the preferred view of the command line arguments after - stripping things like "/use:file.fsx", "-r:Foo.dll" etc. - - - - - Indicate a special console "readline" reader for the evaluation session, if any.  - - A "console" gets used if --readline is specified (the default on Windows + .NET); and --fsi-server is not - given (always combine with --readline-), and OptionalConsoleReadLine is given. - When a console is used, special rules apply to "peekahead", which allows early typing on the console. - Peekahead happens if --peekahead- is not specified (the default). - In this case, a prompt is printed early, a background thread is created and - the OptionalConsoleReadLine is used to read the first line. - If a console is not used, then inReader.Peek() is called early instead. -   - - Further lines are read using OptionalConsoleReadLine(). - If not provided, lines are read using inReader.ReadLine(). -   - - - - - Schedule a restart for the event loop. - - - - - Called by the evaluation session to ask the host to enter a dispatch loop like Application.Run(). - Only called if --gui option is used (which is the default). - Gets called towards the end of startup and every time a ThreadAbort escaped to the backup driver loop. - Return true if a 'restart' is required, which is a bit meaningless. - - - - - Request that the given operation be run synchronously on the event loop. - - - - - The FSharpSymbolUse for the symbol defined - - - - - The symbol defined - - - - - The display name of the symbol defined - - - - - The details of the expression defined - - - - - The value of the symbol defined, if any - - - - - The evaluated F# value - - - - - The identifier of the value - - - - - Represents an evaluated F# value that is bound to an identifier - - - - - The value, as an object - - - - - The type of the value, from the point of view of the .NET type system - - - - - The type of the value, from the point of view of the F# type system - - - - - Represents an evaluated F# value - - - - When set to 'false', disables the display of properties of evaluated objects in the output of the interactive session. - - - When set to 'false', disables the display of sequences in the output of the interactive session. - - - When set to 'false', disables the display of declaration values in the output of the interactive session. - - - Get or set the print width of the interactive session. - - - Get or set the total print size of the interactive session. - - - Get or set the total print length of the interactive session. - - - Get or set the print depth of the interactive session. - - - Get or set the format provider used in the output of the interactive session. - - - Get or set the floating point format used in the output of the interactive session. - - - Gets or sets a the current event loop being used to process interactions. - - - 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. - - - When set to 'false', disables the display of properties of evaluated objects in the output of the interactive session. - - - When set to 'false', disables the display of sequences in the output of the interactive session. - - - When set to 'false', disables the display of declaration values in the output of the interactive session. - - - Get or set the print width of the interactive session. - - - Get or set the total print size of the interactive session. - - - Get or set the total print length of the interactive session. - - - Get or set the print depth of the interactive session. - - - Get or set the format provider used in the output of the interactive session. - - - Get or set the floating point format used in the output of the interactive session. - - - Gets or sets a the current event loop being used to process interactions. - - - 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. - - - Register a printer that controls the output of the interactive session. - - - Register a print transformer that controls the output of the interactive session. - - - - Operations supported by the currently executing F# Interactive session. - - - - Schedule a restart for the event loop. - - - Run the event loop. - True if the event loop was restarted; false otherwise. - - - Request that the given operation be run synchronously on the event loop. - The result of the operation. - - - An event loop used by the currently executing F# Interactive session to execute code - in the context of a GUI or another event-based system. - - - - A default implementation of the 'fsi' object, used by GetDefaultConfiguration(). Note this - is a different object to FSharp.Compiler.Interactive.Settings.fsi in FSharp.Compiler.Interactive.Settings.dll, - which can be used as an alternative implementation of the interactive settings if passed as a parameter - to GetDefaultConfiguration(fsiObj). - - - - - A default implementation of the 'fsi' object, used by GetDefaultConfiguration() - - - - - Parses and checks the whole project, good for compilers (Fable etc.) - Does not retain name resolutions and symbol uses which are quite memory hungry (so no intellisense etc.). - Already parsed files will be cached so subsequent compilations will be faster. - - - - - Parses and checks file in project, will compile and cache all the files up to this one - (if not already done before), or fetch them from cache. Returns partial project results, - up to and including the file requested. Returns parse and typecheck results containing - name resolutions and symbol uses for the file requested only, so intellisense etc. works. - - - - - Find the transitive dependent files of the current file based on the untyped syntax tree. - - - - - Compile project to file. If project has already been type checked, - check results will be taken from the cache. - - - - - Clears parse and typecheck caches. - - - - - Errors grouped by file, sorted by line, column - - - - - Get the Reference Assemblies directory for the .NET Framework (on Windows) - This is added to the default resolution path for - design-time compilations. - - - - - Perform assembly resolution on the given references under the given conditions - - - - - Get the "v4.5.1"-style moniker for the highest installed .NET Framework version. - This is the value passed back to Resolve if no explicit "mscorlib" has been given. - - Note: If an explicit "mscorlib" is given, then --noframework is being used, and the whole ReferenceResolver logic is essentially - unused. However in the future an option may be added to allow an explicit specification of - a .NET Framework version to use for scripts. - - - - - Round-tripped baggage - - - - - Prepare textual information about where the assembly was resolved from, used for tooltip output - - - - - Item specification. - - - - - Indicates a script or source being dynamically compiled and executed. Uses implementation assemblies. - - - - - Indicates a script or source being edited or compiled. Uses reference assemblies (not implementation assemblies). - - - - - A builder that will build an item key store based on the written Item and its associated range. - - - - - Stores a list of item key strings and their ranges in a memory mapped file. - - - - - The timestamp of the source. - - - - - The file path of the source. - - - - - Gets the internal text container. Text may be on-disk, in a stream, or a source text. - - - - - Creates a FSharpSource from disk. Only used internally. - - - - - Creates a FSharpSource from the specified file path by shadow-copying the file. - - - - - Creates a FSharpSource. - - - - - The storage container for a F# source item that could either be on-disk or in-memory. - TODO: Make this public. - - - - - The TcConfig passed in to the builder creation. - - - - - The full set of source files including those from options - - - - - Raised just after the whole project has finished type checking. At this point, accessing the - overall analysis results for the project will be quick. - - - - - Check if one of the build's references is invalidated. - - - - - Raised when the build is invalidated. - - - - - Raised just after a file is parsed - - - - - Raised just after a file is checked - - - - - Raised just before a file is type-checked, to invalidate the state of the file in VS and force VS to request a new direct typecheck of the file. - The incremental builder also typechecks the file (error and intellisense results from the background builder are not - used by VS). - - - - - The list of files the build depends on - - - - - Get the preceding typecheck state of a slot, WITH checking if it is up-to-date w.r.t. the timestamps of files and referenced DLLs prior to this one. - However, files will not be parsed or checked. - Return None if the result is not available or if it is not up-to-date. - - This is safe for use from non-compiler threads but the objects returned must in many cases be accessed only from the compiler thread. - - - - - Create the incremental builder - - - - - The project build. Return true if the background work is finished. - - - - - Await the untyped parse results for a particular slot in the vector of parse results. - - This may be a marginally long-running operation (parses are relatively quick, only one file needs to be parsed) - - - - - Get the logical time stamp that is associated with the output of the project if it were fully built immediately - - - - - Get the preceding typecheck state of a slot. Compute the entire type check of the project up - to the necessary point if the result is not available. This may be a long-running operation. - This will get full type-check info for the file, meaning no partial type-checking. - - - - - Get the final typecheck result. If 'generateTypedImplFiles' was set on Create then the CheckedAssemblyAfterOptimization will contain implementations. - This may be a long-running operation. - This will get full type-check info for the project, meaning no partial type-checking. - - - - - Get the typecheck state after checking a file. Compute the entire type check of the project up - to the necessary point if the result is not available. This may be a long-running operation. - This will get full type-check info for the file, meaning no partial type-checking. - - - - - Get the typecheck state of a slot, without checking if it is up-to-date w.r.t. - the timestamps on files and referenced DLLs prior to this one. Return None if the result is not available. - This is a very quick operation. - - This is safe for use from non-compiler threads but the objects returned must in many cases be accessed only from the compiler thread. - - - - - Get the preceding typecheck state of a slot, without checking if it is up-to-date w.r.t. - the timestamps on files and referenced DLLs prior to this one. Return None if the result is not available. - This is a very quick operation. - - This is safe for use from non-compiler threads but the objects returned must in many cases be accessed only from the compiler thread. - - - - - Get the preceding typecheck state of a slot. Compute the entire type check of the project up - to the necessary point if the result is not available. This may be a long-running operation. - - - - - Get the final typecheck result. If 'generateTypedImplFiles' was set on Create then the CheckedAssemblyAfterOptimization will contain implementations. - This may be a long-running operation. - - - - - Get the typecheck result after the end of the last file. The typecheck of the project is not 'completed'. - This may be a long-running operation. - - - - - Get the typecheck state after checking a file. Compute the entire type check of the project up - to the necessary point if the result is not available. This may be a long-running operation. - - - - - Does the given file exist in the builder's pipeline? - - - - - Get the preceding typecheck state of a slot, but only if it is up-to-date w.r.t. - the timestamps on files and referenced DLLs prior to this one. Return None if the result is not available. - This is a relatively quick operation. - - This is safe for use from non-compiler threads - - - - - Manages an incremental build graph for the build of an F# project - - - - - Compute both the "TcInfo" and "TcInfoExtras" parts of the results. - Can cause a second type-check if `enablePartialTypeChecking` is true in the checker. - Only use when it's absolutely necessary to get rich information on a file. - - - - - Compute the "TcInfo" part of the results. If `enablePartialTypeChecking` is false then - extras will also be available. - - - - - Can cause a second type-check if `enablePartialTypeChecking` is true in the checker. - Only use when it's absolutely necessary to get rich information on a file. - - Will return 'None' for enableBackgroundItemKeyStoreAndSemanticClassification=false. - - - - - Compute the "ItemKeyStore" parts of the results. - Can cause a second type-check if `enablePartialTypeChecking` is true in the checker. - Only use when it's absolutely necessary to get rich information on a file. - - Will return 'None' for enableBackgroundItemKeyStoreAndSemanticClassification=false. - - - - - Represents the state in the incremental graph associated with checking a file - - - - - If enabled, holds semantic classification information for Item(symbol)s in a file. - - - - - If enabled, stores a linear list of ranges and strings that identify an Item(symbol) in a file. Used for background find all references. - - - - - Result of checking most recent file, if any - - - - - Accumulated results of type checking. Optional data that isn't needed to type-check a file, but needed for more information for in tooling. - - - - - Accumulated errors, last file first - - - - - Disambiguation table for module names - - - - - Accumulated diagnostics - - - - - Accumulated results of type checking. The minimum amount of state in order to continue type-checking following files. - - - - - Lookup the global static cache for building the FrameworkTcImports - - - - - The syntax tree resulting from the parse - - - - - Indicates if any errors occurred during the parse - - - - - Name of the file for which this information were created - - - - - Get the errors and warnings for the parse - - - - - When these files change then the build is invalid - - - - - Return the inner-most range associated with a possible breakpoint location - - - - - Attempts to find the range of the string interpolation that contains a given position. - - - - - Gets the range of where a return type hint could be placed for a function binding. This will be right in front of the equals sign. - Returns None if type annotation is present. - - - - - Given the position of an expression, attempts to find the range of the - '!' in a derefence operation of that expression, like: - '!expr', '!(expr)', etc. - - - - - Attempts to find the range of a record expression containing the given position. - - - - - Attempts to find the range of an attempted lambda expression or pattern, the argument range, and the expr range when writing a C#-style "lambda" (which is actually an operator application) - - - - - Attempts to find the range of the name of the nearest outer binding that contains a given position. - - - - - Attempts to find the range of a function or method that is being applied. Also accounts for functions in pipelines. - - - - - Gets the range of an expression being dereferenced. For `!expr`, gives the range of `expr` - - - - - Attempts to find the range of an expression `expr` contained in a `yield expr` or `return expr` expression (and bang-variants). - - - - - Attempts to find an Ident of a pipeline containing the given position, and the number of args already applied in that pipeline. - For example, '[1..10] |> List.map ' would give back the ident of '|>' and 1, because it applied 1 arg (the list) to 'List.map'. - - - - - Determines if the range points to a type name in the type definition. - - - - - Determines if the expression or pattern at the given position has a type annotation - - - - - Determines if the given position is bound to a type definition - - - - - Determines if the given position is bound to a record definition - - - - - Determines if the given position is contained within a curried parameter in a binding. - - - - - Determines if the given position is inside a function or method application. - - - - - Determines if the binding at the given position is bound to a lambda expression - - - - - Get declared items and the selected item at the specified location - - - - - Gets the ranges of all arguments, if they can be found, for a function application at the given position. - - - - - Notable parse info for ParameterInfo at a given location - - - - - Represents the results of parsing an F# file and a set of analysis operations based on the parse tree alone. - - - - - Get the resolution of the ProjectOptions - - - - - Indicates if critical errors existed in the project options - - - - - The errors returned by processing the project - - - - - Indicates the set of files which must be watched to accurately track changes that affect these results, - Clients interested in reacting to updates to these files should watch these files and take actions as described - in the documentation for compiler service. - - - - - Get a view of the overall signature of the assembly. Only valid to use if HasCriticalErrors is false. - - - - - Get a view of the overall contents of the assembly. Only valid to use if HasCriticalErrors is false. - - - - - Get the textual usages that resolved to the given symbol throughout the project - - - - - Get an optimized view of the overall contents of the assembly. Only valid to use if HasCriticalErrors is false. - - - - - Get all textual usages of all symbols throughout the project - - - - - A handle to the results of CheckFileInProject. - - - - - Success - - - - - Aborted because cancellation caused an abandonment of the operation - - - - - The result of calling TypeCheckResult including the possibility of abort and background compiler not caught up. - - - - - Get the resolution of the ProjectOptions - - - - - Get a view of the contents of the assembly up to and including the file just checked - - - - - Open declarations in the file, including auto open modules. - - - - - Represents complete typechecked implementation file, including its typechecked signatures if any. - - - - - Indicates whether type checking successfully occurred with some results returned. If false, indicates that - an unrecoverable error in earlier checking/parsing/resolution steps. - - - - - The errors returned by parsing a source file. - - - - - Indicates the set of files which must be watched to accurately track changes that affect these results, - Clients interested in reacting to updates to these files should watch these files and take actions as described - in the documentation for compiler service. - - - - - Tries to get the current successful TcImports. This is only used in testing. Do not use it for other stuff. - - - - - Internal constructor - - - - - Internal constructor - - - - - Determines if a long ident is resolvable at a specific point. - - - - - Determines if a long ident is resolvable at a specific point. - - - - - Get the textual usages that resolved to the given symbol throughout the file - - - - Compute a formatted tooltip for the given location - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - Used to discriminate between 'identifiers', 'strings' and others. For strings, an attempt is made to give a tooltip for a #r "..." location. Use a value from FSharpTokenInfo.Tag, or FSharpTokenTag.Identifier, unless you have other information available. - The optional width that the layout gets squashed to. - - - Similar to GetSymbolUseAtLocation, but returns all found symbols if there are multiple. - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - Resolve the names at the given location to a use of symbol. - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - Get any extra colorization info that is available after the typecheck - - - Compute a set of method overloads to show in a dialog relevant to the given code location. The resulting method overloads are returned as symbols. - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - Compute a set of method overloads to show in a dialog relevant to the given code location. - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - Compute a formatted tooltip for the given keywords - - The keywords at the location where the information is being requested. - - - Get the locations of and number of arguments associated with format specifiers - - - Get the locations of format specifiers - - - Compute the Visual Studio F1-help key identifier for the given location, based on name resolution results - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - - - - Find the most precise display environment for the given line and column. - - - - Compute a formatted tooltip for the given symbol at position - - The symbol. - Generic arguments. - Display the symbol full name. - The position. - - - Resolve the names at the given location to the declaration location of the corresponding construct. - - The line number where the information is being requested. - The column number at the end of the identifiers where the information is being requested. - The text of the line where the information is being requested. - The identifiers at the location where the information is being requested. - If not given, then get the location of the symbol. If false, then prefer the location of the corresponding symbol in the implementation of the file (rather than the signature if present). If true, prefer the location of the corresponding symbol in the signature of the file (rather than the implementation). - - - Get the items for a declaration list in FSharpSymbol format - - - If this is present, it is used to filter declarations based on location in the - parse tree, specifically at 'open' declarations, 'inherit' of class or interface - 'record field' locations and r.h.s. of 'range' operator a..b - - The line number where the completion is happening - - Partial long name. QuickParse.GetPartialLongNameEx can be used to get it. - - - The text of the line where the completion is happening. This is only used to make a couple - of adhoc corrections to completion accuracy (e.g. checking for "..") - - - Function that returns all entities from current and referenced assemblies. - - - - Get the items for a declaration list - - - If this is present, it is used to filter declarations based on location in the - parse tree, specifically at 'open' declarations, 'inherit' of class or interface - 'record field' locations and r.h.s. of 'range' operator a..b - - The line number where the completion is happening - - Partial long name. QuickParse.GetPartialLongNameEx can be used to get it. - - - The text of the line where the completion is happening. This is only used to make a couple - of adhoc corrections to completion accuracy (e.g. checking for "..") - - - Function that returns all entities from current and referenced assemblies. - - - Completion context for a particular position computed in advance. - - - - - Get all textual usages of all symbols throughout the file - - - - - Lays out and returns the formatted signature for the typechecked file as source text. - - - - - Internal constructor - check a file and collect errors - - - - - A handle to the results of CheckFileInProject. - - - - - Indicates if the ranges returned by parsing should have '#line' directives applied to them. - When compiling code, this should usually be 'true'. For editing tools, this is usually 'false. - The default for FSharpParsingOptions.ApplyLineDirectives is 'false'. The default for - FSharpParsingOptions arising from FSharpProjectOptions will be 'true' unless '--ignorelinedirectives' is used in the - parameters from which these are derived. - - - - - Options used to determine active --define conditionals and other options relevant to parsing files in a project - - - - - Get the project options - - - - - Get the accessibility rights for this project context w.r.t. InternalsVisibleTo attributes granting access to other assemblies - - - - - Get the resolution and full contents of the assemblies referenced by the project options - - - - - Represents the checking context implied by the ProjectOptions - - - - - The symbol referenced - - - - - The range of text representing the reference to the symbol - - - - - Indicates if the FSharpSymbolUse is private to the implementation & signature file. - This is true for function and method parameters. - - - - - Indicates if the FSharpSymbolUse is declared as private - - - - - Indicates if the reference is used for example at a call site - - - - - Indicates if the reference is in a syntactic type - - - - - Indicates if the reference is in a pattern - - - - - Indicates if the reference is in open statement - - - - - Indicates if the reference is via the member being implemented in a class or object expression - - - - - Indicates if the reference is a definition for the symbol, either in a signature or implementation - - - - - Indicates if the reference is either a builder or a custom operation in a computation expression - - - - - Indicates if the reference is in an attribute - - - - - The file name the reference occurs in - - - - - The display context active at the point where the symbol is used. Can be passed to FSharpType.Format - and other methods to format items in a way that is suitable for a specific source code location. - - - - - Represents the use of an F# symbol from F# source code - - - - - A reference from an ILModuleReader. - - The fully qualified path to the output of the referenced project. This should be the same value as the -r reference in the project options for this referenced project. - A function that calculates a last-modified timestamp for this reference. This will be used to determine if the reference is up-to-date. - A function that creates an ILModuleReader for reading module data. - - - - A reference for any portable executable, including F#. The stream is owned by this reference. - The stream will be automatically disposed when there are no references to FSharpReferencedProject and is GC collected. - Once the stream is evaluated, the function that constructs the stream will no longer be referenced by anything. - If the stream evaluation throws an exception, it will be automatically handled. - - A function that calculates a last-modified timestamp for this reference. This will be used to determine if the reference is up-to-date. - A function that opens a Portable Executable data stream for reading. - - - - A reference for an F# project. The physical data for it is stored/cached inside of the compiler service. - - The fully qualified path to the output of the referenced project. This should be the same value as the -r reference in the project options for this referenced project. - The Project Options for this F# project - - - - The fully qualified path to the output of the referenced project. This should be the same value as the -r - reference in the project options for this referenced project. - - - - - An optional stamp to uniquely identify this set of options - If two sets of options both have stamps, then they are considered equal - if and only if the stamps are equal - - - - - Unused in this API and should be '[]' when used as user-specified input - - - - - Unused in this API and should be 'None' when used as user-specified input - - - - - Timestamp of project/script load, used to differentiate between different instances of a project load. - This ensures that a complete reload of the project or script type checking - context occurs on project or script unload/reload. - - - - - When true, use the reference resolution rules for scripts rather than the rules for compiler. - - - - - When true, the typechecking environment is known a priori to be incomplete, for - example when a .fs file is opened outside of a project. In this case, the number of error - messages reported is reduced. - - - - - The command line arguments for the other projects referenced by this project, indexed by the - exact text used in the "-r:" reference in FSharpProjectOptions. - - - - - Additional command line argument options for the project. These can include additional files and references. - - - - - The files in the project - - - - - This is the unique identifier for the project, it is case sensitive. If it's None, will key off of ProjectFileName in our caching. - - - - - Compute the project directory. - - - - - Whether the two parse options refer to the same project. - - - - - Compare two options sets with respect to the parts of the options that are important to building. - - - - A set of information describing a project or script build configuration. - - - Unused in this API - - - - Will lazily create the ILModuleReader. - Is only evaluated once and can be called by multiple threads. - - - - - Delays the creation of an ILModuleReader - - - - - Notify the host that a project has been fully checked in the background (using file contents provided by the file system API) - - The event may be raised on a background thread. - - - - - Raised after a parse of a file in the background analysis. - - The event will be raised on a background thread. - - - - - Raised after a check of a file in the background analysis. - - The event will be raised on a background thread. - - - - - Notify the host that the logical type checking context for a file has now been updated internally - and that the file has become eligible to be re-typechecked for errors. - The event will be raised on a background thread. - - - - - Report a statistic for testability - - - - - Report a statistic for testability - - - - - Try to get type check results for a file. This looks up the results of recent type checks of the - same file, regardless of contents. The version tag specified in the original check of the file is returned. - 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 intellisense menus and information. - - - The file name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - Optionally, specify source that must match the previous parse precisely. - An optional string used for tracing compiler operations associated with this request. - - - - Tokenize a single line, returning token information and a tokenization state represented by an integer - - - - - Tokenize an entire file, line by line - - - - - Parses a source code for a file. Returns an AST that can be traversed for various features. - - - The path for the file. The file name is also as a module name for implicit top level modules (e.g. in scripts). - The source to be parsed. - Parsing options for the project or script. - Store the parse in a size-limited cache assocaited with the FSharpChecker. Default: true - An optional string used for tracing compiler operations associated with this request. - - - - Parses a source code for a file and caches the results. Returns an AST that can be traversed for various features. - - - The path for the file. The file name is used as a module name for implicit top level modules (e.g. in scripts). - The source to be parsed. - Parsing options for the project or script. - Store the parse in a size-limited cache assocaited with the FSharpChecker. Default: true - An optional string used for tracing compiler operations associated with this request. - - - - Parse and typecheck all files in a project. - All files are read from the FileSystem API - Can cause a second type-check on the entire project when `enablePartialTypeChecking` is true on the FSharpChecker. - - - The options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - - Parse and check a source code file, returning a handle to the results - - - Note: all files except the one being checked are read from the FileSystem API - - - Return FSharpCheckFileAnswer.Aborted if a parse tree was not available. - - - - The name of the file in the project whose source is being checked. - An integer that can be used to indicate the version of the file. This will be returned by TryGetRecentCheckResultsForFile when looking up the file. - The source for the file. - The options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - This function is called when a project has been cleaned/rebuilt, and thus any live type providers should be refreshed. - - - The options describing the project that has been cleaned. - An optional string used for tracing compiler operations associated with this request. - - - - Notify the checker that given file has changed. This needs to be used when checker is created with documentSource = Custom. - - - - - Parse a source code file, returning information about brace matching in the file. - Return an enumeration of the matching parenthetical tokens in the file. - - - The fileName for the file, used to help caching of results. - The full source for the file. - Parsing options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - Parse a source code file, returning information about brace matching in the file. - Return an enumeration of the matching parenthetical tokens in the file. - - - The fileName for the file, used to help caching of results. - The full source for the file. - Parsing options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - This function is called when the configuration is known to have changed for reasons not encoded in the ProjectOptions. - For example, dependent references may have been deleted or created. - - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - An optional string used for tracing compiler operations associated with this request. - - - - This function is called when the entire environment is known to have changed for reasons not encoded in the ProjectOptions of any project/compilation. - - - - - For a given script file, get the FSharpProjectOptions implied by the #load closure. - All files are read from the FileSystem API, except the file being checked. - - - Used to differentiate between scripts, to consider each script a separate project. Also used in formatted error messages. - The source for the file. - Is the preview compiler enabled. - Indicates when the script was loaded into the editing environment, - so that an 'unload' and 'reload' action will cause the script to be considered as a new project, - so that references are re-resolved. - Other flags for compilation. - Add a default reference to the FSharp.Compiler.Interactive.Settings library. - Use the implicit references from the .NET SDK. - Set up compilation and analysis for .NET Framework scripts. - Override the .NET SDK used for default references. - An optional unique stamp for the options. - An optional string used for tracing compiler operations associated with this request. - - - Get the FSharpProjectOptions implied by a set of command line arguments. - - Used to differentiate between projects and for the base directory of the project. - The command line arguments for the project build. - Indicates when the script was loaded into the editing environment, - Indicates that compilation should assume the EDITING define and related settings - Indicates that compilation should assume the INTERACTIVE define and related settings - so that an 'unload' and 'reload' action will cause the script to be considered as a new project, - so that references are re-resolved. - - - - Get the FSharpParsingOptions implied by a FSharpProjectOptions. - - - The overall options. - - - - Get the FSharpParsingOptions implied by a set of command line arguments. - - - The command line arguments for the project build. - Indicates that parsing should assume the INTERACTIVE define and related settings - Indicates that compilation should assume the EDITING define and related settings - - - - Get the FSharpParsingOptions implied by a set of command line arguments and list of source files. - - - Initial source files list. Additional files may be added during argv evaluation. - The command line arguments for the project build. - Indicates that parsing should assume the INTERACTIVE define and related settings - Indicates that compilation should assume the EDITING define and related settings - - - - Get semantic classification for a file. - All files are read from the FileSystem API, including the file being checked. - Can cause a second type-check when `enablePartialTypeChecking` is true on the FSharpChecker. - - - The file name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - An optional string used for tracing compiler operations associated with this request. - - - - Like ParseFile, but uses results from the background builder. - All files are read from the FileSystem API, including the file being checked. - - - The name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - An optional string used for tracing compiler operations associated with this request. - - - - Like CheckFileInProject, but uses the existing results from the background builder. - All files are read from the FileSystem API, including the file being checked. - Can cause a second type-check when `enablePartialTypeChecking` is true on the FSharpChecker. - - - The file name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - An optional string used for tracing compiler operations associated with this request. - - - - Optimized find references for a given symbol in a file of project. - All files are read from the FileSystem API, including the file being checked. - Can cause a second type-check when `enablePartialTypeChecking` is true on the FSharpChecker. - - - The file name for the file. - The options for the project or script, used to determine active --define conditionals and other options relevant to parsing. - The symbol to find all uses in the file. - Default: true. If true, this call can invalidate the current state of project if the options have changed. If false, the current state of the project will be used. - Default: false. Experimental feature that makes the operation faster. Requires FSharpChecker to be created with captureIdentifiersWhenParsing = true. - An optional string used for tracing compiler operations associated with this request. - - - - Create an instance of an FSharpChecker. - - - The optional size of the project checking cache. - Keep the checked contents of projects. - If false, do not keep full intermediate checking results from background checking suitable for returning from GetBackgroundCheckResultsForFileInProject. This reduces memory usage. - An optional resolver for legacy MSBuild references - An optional resolver to access the contents of .NET binaries in a memory-efficient way - Indicate whether name suggestion should be enabled - Indicate whether all symbol uses should be kept in background checking - Indicates whether a table of symbol keys should be kept for background compilation - Indicates whether to perform partial type checking. Cannot be set to true if keepAssmeblyContents is true. If set to true, can cause duplicate type-checks when richer information on a file is needed, but can skip background type-checking entirely on implementation files with signature files. - Indicates whether to resolve references in parallel. - When set to true we create a set of all identifiers for each parsed file which can be used to speed up finding references. - Default: FileSystem. You can use Custom source to provide a function that will return the source for a given file path instead of reading it from the file system. Note that with this option the FSharpChecker will also not monitor the file system for file changes. It will expect to be notified of changes via the NotifyFileChanged method. - Default: true. Indicates whether to keep parsing results in a cache. - - - - Compile using the given flags. Source files names are resolved via the FileSystem API. - The output file must be given by a -o flag. - The first argument is ignored and can just be "fsc.exe". - - - The command line arguments for the project build. - An optional string used for tracing compiler operations associated with this request. - - - - Flush all caches and garbage collect - - - - Clear the internal cache of the given projects. - The given project options. - An optional string used for tracing compiler operations associated with this request. - - - - Check a source code file, returning a handle to the results of the parse including - the reconstructed types in the file. - - All files except the one being checked are read from the FileSystem API - Note: returns NoAntecedent if the background builder is not yet done preparing the type check context for the - file (e.g. loading references and parsing/checking files in the project that this file depends upon). - In this case, the caller can either retry, or wait for FileTypeCheckStateIsDirty to be raised for this file. - - - - The results of ParseFile for this file. - The name of the file in the project whose source is being checked. - An integer that can be used to indicate the version of the file. This will be returned by TryGetRecentCheckResultsForFile when looking up the file. - The full source for the file. - The options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - - Check a source code file, returning a handle to the results - - - Note: all files except the one being checked are read from the FileSystem API - - - Return FSharpCheckFileAnswer.Aborted if a parse tree was not available. - - - - The results of ParseFile for this file. - The name of the file in the project whose source is being checked. - An integer that can be used to indicate the version of the file. This will be returned by TryGetRecentCheckResultsForFile when looking up the file. - The full source for the file. - The options for the project or script. - An optional string used for tracing compiler operations associated with this request. - - - - Used to parse and check F# source code. - - - - - Used for unit testing. Causes all steps of underlying incremental graph evaluation to cancel - - - - - Generalized Incremental Builder. This is exposed only for unit testing purposes. - - - - - Used for unit testing - - - - - test if an arg is a path to fsc.exe - - - - - test if --vserrors flag is set - - - - - test if --test:ErrorRanges flag is set - - - - - do compilation as if args was argv to fsc.exe - - - - - in-proc version of fsc.exe - - - - - combined warning and error details - - - - - build issue details - - - - - build issue location - - - - - Part of LegacyHostedCompilerForTesting - - Yet another DiagnosticsLogger implementation, capturing the messages but only up to the maxerrors maximum - - - - - runs in-proc fsc compilation, returns array consisting of exit code, then compiler output - - - - - splits a provided command line string into argv array - currently handles quotes, but not escaped quotes - - - - diff --git a/lib/fcs/nojaf/Release/FSharp.Core.dll b/lib/fcs/nojaf/Release/FSharp.Core.dll deleted file mode 100644 index a2e2530543..0000000000 Binary files a/lib/fcs/nojaf/Release/FSharp.Core.dll and /dev/null differ diff --git a/lib/fcs/nojaf/Release/FSharp.Core.xml b/lib/fcs/nojaf/Release/FSharp.Core.xml deleted file mode 100644 index e5298f5ef3..0000000000 --- a/lib/fcs/nojaf/Release/FSharp.Core.xml +++ /dev/null @@ -1,28468 +0,0 @@ - - -FSharp.Core - - - - Specifies the types of members that are dynamically accessed. - - This enumeration has a attribute that allows a - bitwise combination of its member values. - - - - An abbreviation for the CLI type - - - See the module for further operations related to sequences. - - See also F# Language Guide - Sequences. - - - - An abbreviation for the CLI type - - - The type of immutable singly-linked lists. - - See the module for further operations related to 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. - - See also F# Language Guide - Lists. - - - - 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 - - - Gets the element of the list at the given position. - Lists are represented as linked lists so this is an O(n) operation. - The index. - - The value at the given index. - - - 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 - - - Gets a slice of the list, the elements of the list from the given start index to the given end index. - - The start index. - The end index. - - The sub list specified by the input indices. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. - The offset from the end. - - The corresponding index from the start. - - - Returns a list with head as its first element and tail as its subsequent elements - - A new head value for the list. - The existing list. - - The list with head appended to the front of tail. - - - 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. - - - - - - All the values in the map, including the duplicates. - The sequence will be ordered by the keys of the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Values // evaluates to seq ["a"; "b"] - - - - - The keys in the map. - The sequence will be ordered by the keys of the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Keys // evaluates to seq [1; 2] - - - - - Lookup an element in the map. Raise KeyNotFoundException if no binding - exists in the map. - - The input key. - Thrown when the key is not found. - - The value mapped to the key. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.[1] // evaluates to "a" - sample.[3] // throws KeyNotFoundException - - - - - Returns true if there are no bindings in the map. - - - - let emptyMap: Map<int, string> = Map.empty - emptyMap.IsEmpty // evaluates to true - - let notEmptyMap = Map [ (1, "a"); (2, "b") ] - notEmptyMap.IsEmpty // evaluates to false - - - - - The number of bindings in the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Count // evaluates to 2 - - - - - Lookup an element in the map, assigning to value if the element is in the domain - of the map and returning false if not. - - The input key. - A reference to the output value. - - true if the value is present, false if not. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.TryGetValue 1 // evaluates to (true, "a") - sample.TryGetValue 3 // evaluates to (false, null) - - let mutable x = "" - sample.TryGetValue (1, &x) // evaluates to true, x set to "a" - - let mutable y = "" - sample.TryGetValue (3, &y) // evaluates to false, y unchanged - - - - - 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 input key. - - The mapped value, or None if the key is not in the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.TryFind 1 // evaluates to Some "a" - sample.TryFind 3 // evaluates to None - - - - - Removes an element from the domain of the map. No exception is raised if the element is not present. - - The input key. - - The resulting map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Remove 1 // evaluates to map [(2, "b")] - sample.Remove 3 // equal to sample - - - - - Tests if an element is in the domain of the map. - - The input key. - - True if the map contains the given key. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.ContainsKey 1 // evaluates to true - sample.ContainsKey 3 // evaluates to false - - - - - Returns a new map with the value stored under key changed according to f. - - The input key. - The change function. - - The resulting map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - let f x = - match x with - | Some s -> Some (s + "z") - | None -> None - - sample.Change (1, f) // evaluates to map [(1, "az"); (2, "b")] - - - - - Returns a new map with the binding added to the given map. - If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. - The key to add. - The value to add. - - The resulting map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample.Add (3, "c") // evaluates to map [(1, "a"); (2, "b"); (3, "c")] - sample.Add (2, "aa") // evaluates to map [(1, "a"); (2, "aa")] - - - - - Builds a map that contains the bindings of the given IEnumerable. - - The input sequence of key/value pairs. - - The resulting map. - - - - Map [ (1, "a"); (2, "b") ] // evaluates to map [(1, "a"); (2, "b")] - - - - - Immutable maps based on binary trees, where keys are ordered by F# generic comparison. By default - comparison is the F# structural comparison function or uses implementations of the IComparable interface on key values. - - See the module for further operations on maps. - - All members of this class are thread-safe and may be used concurrently from multiple threads. - - - Returns a new set with the elements of the second set removed from the first. - - The first input set. - The second input set. - - A set containing elements of the first set that are not contained in the second set. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"The new set is: {set1 - set2}" - - The sample evaluates to the following output: The new set is: set [1] - - - - Compute the union of the two sets. - - The first input set. - The second input set. - - The union of the two input sets. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"Output is %A" {set1 + set2}" - - The sample evaluates to the following output: The new set is: set [1; 2; 3; 4] - - - - Returns the lowest element in the set according to the ordering being used for the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"MinimumElement: {set.MinimumElement}" - - The sample evaluates to the following output: MinimumElement: 1 - - - - Returns the highest element in the set according to the ordering being used for the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"MaximumElement: {set.MaximumElement}" - - The sample evaluates to the following output: MaximumElement: 3 - - - - A useful shortcut for Set.isEmpty. See the Set module for further operations on sets. - - - - let set = Set.empty.Add(2).Add(3) - printfn $"Is the set empty? {set.IsEmpty}" - - The sample evaluates to the following output: Is the set empty? false - - - - The number of elements in the set - - - - let set = Set.empty.Add(1).Add(1).Add(2) - printfn $"The set has {set.Count} elements" - - The sample evaluates to the following output: The set has 3 elements - - - - 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. - - The value to remove from the set. - - The result set. - - - - let set = Set.empty.Add(1).Add(1).Add(2) - printfn $"The new set is: {set}" - - The sample evaluates to the following output: The new set is: set [2] - - - - Evaluates to "true" if all elements of the second set are in the first. - - The set to test against. - - True if this set is a superset of otherSet. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a superset of {set2}? {Set.isSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a superset of set [1; 2; 3; 4]? false - - - - Evaluates to "true" if all elements of the first set are in the second. - - The set to test against. - - True if this set is a subset of otherSet. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a subset of {set2}? {Set.isSubset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a subset of set [1; 2; 3; 4]? true - - - - Evaluates to "true" if all elements of the second set are in the first, and at least - one element of the first is not in the second. - - The set to test against. - - True if this set is a proper superset of otherSet. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a proper superset of {set2}? {Set.isProperSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a proper superset of set [1; 2; 3; 4]? false - - - - Evaluates to "true" if all elements of the first set are in the second, and at least - one element of the second is not in the first. - - The set to test against. - - True if this set is a proper subset of otherSet. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a proper superset of {set2}? {Set.isProperSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a proper subset of set [1; 2; 3; 4]? true - - - - A useful shortcut for Set.contains. See the Set module for further operations on sets. - - The value to check. - - True if the set contains value. - - - - let set = Set.empty.Add(2).Add(3) - printfn $"Does the set contain 1? {set.Contains(1)}" - - The sample evaluates to the following output: Does the set contain 1? false - - - - 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. - - The value to add to the set. - - The result set. - - - - let set = Set.empty.Add(1).Add(1).Add(2) - printfn $"The new set is: {set}" - - The sample evaluates to the following output: The new set is: set [1; 2] - - - - Create a set containing elements drawn from the given sequence. - The input sequence. - - The result set. - - - - let sequenceOfNumbers = seq { 1 .. 3 } - let numbersInSet = Set(sequenceOfNumbers) - printfn $"The set is {numbersInSet}" - - - Creates a new Set containing the elements of the given sequence. set [1; 2; 3] - - - Immutable sets based on binary trees, where elements are ordered by F# generic comparison. By default - comparison is the F# structural comparison function or uses implementations of the IComparable interface on element values. - - See the module for further operations on sets. - - All members of this class are thread-safe and may be used concurrently from multiple threads. - - - Fetches an element from a 2D array. You can also use the syntax array.[index1,index2]. - - The input array. - The index along the first dimension. - The index along the second dimension. - - The value of the array at the given index. - Thrown when the indices are negative or exceed the bounds of the array. - - - Indexer syntax is generally preferred, e.g. - - let array = array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ] - - array[0,1] - - Evaluates to 2.0. - - - - - let array = array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ] - - Array2D.get array 0 1 - - Evaluates to 2.0. - - - - Sets the value of an element in an array. You can also use the syntax array.[index1,index2] <- value. - - The input array. - The index along the first dimension. - The index along the second dimension. - The value to set in the array. - - Thrown when the indices are negative or exceed the bounds of the array. - - - Indexer syntax is generally preferred, e.g. - - let array = Array2D.zeroCreate 2 2 - - array[0,1] <- 4.0 - - - - - - let array = Array2D.zeroCreate 2 2 - - Array2D.set array 0 1 4.0 - - After evaluation array is a 2x2 array with contents [[0.0; 4.0]; [0.0; 0.0]] - - - - Builds 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. - - The input array. - - The zero-based output array. - - - - let inputs = Array2D.createBased 1 1 2 3 1 - - inputs |> Array2D.rebase - - Evaluates to a 2x2 zero-based array with contents [[1; 1]; [1; 1]] - - - - Builds 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 propagated to the output - array. - - A function that is applied to transform each element of the array. The two integers - provide the index of the element. - The input array. - - An array whose elements have been transformed by the given mapping. - - - - let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - - inputs |> Array2D.mapi (fun i j v -> i + j + v) - - Evaluates to a 2x2 array with contents [[3; 5;]; [14; 16]] - - - - Builds 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 propagated to the output - array. - - A function that is applied to transform each item of the input array. - The input array. - - An array whose elements have been transformed by the given mapping. - - - - let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - - inputs |> Array2D.map (fun v -> 2 * v) - - Evaluates to a 2x2 array with contents [[6; 8;]; [26; 28]] - - - - Returns the length of an array in the second dimension. - - The input array. - - The length of the array in the second dimension. - - - - let array = array2D [ [ 3; 4; 5 ]; [ 13; 14; 15 ] ] - - array |> Array2D.length2 - - Evaluates to 3. - - - - Returns the length of an array in the first dimension. - - The input array. - - The length of the array in the first dimension. - - - - let array = array2D [ [ 3; 4; 5 ]; [ 13; 14; 15 ] ] - - array |> Array2D.length1 - - Evaluates to 2. - - - - Applies the given function to each element of the array. The integer indices passed to the - function indicates the index of element. - - A function to apply to each element of the array with the indices available as an argument. - The input array. - - - - let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - - inputs |> Array2D.iteri (fun i j v -> printfn $"value at ({i},{j}) = {v}") - - Evaluates to unit and prints - - value at (0,0) = 3 - value at (0,1) = 4 - value at (1,0) = 13 - value at (1,1) = 14 - - in the console. - - - - Applies the given function to each element of the array. - - A function to apply to each element of the array. - The input array. - - - - let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - - inputs |> Array2D.iter (fun v -> printfn $"value = {v}") - - Evaluates to unit and prints - - value = 3 - value = 4 - value = 13 - value = 14 - - in the console. - - - - Creates a based array where the entries are initially Unchecked.defaultof<'T>. - - The base for the first dimension of the array. - The base for the second dimension of the array. - The length of the first dimension of the array. - The length of the second dimension of the array. - - The created array. - Thrown when base1, base2, length1, or length2 is negative. - - - - Array2D.zeroCreateBased 1 1 2 3 - - Evaluates to a 2x3 1-based array with contents [[0; 0; 0]; [0; 0; 0]] - - - - - Creates a based array whose elements are all initially the given value. - - The base for the first dimension of the array. - The base for the second dimension of the array. - The length of the first dimension of the array. - The length of the second dimension of the array. - The value to populate the new array. - - The created array. - Thrown when base1, base2, length1, or length2 is negative. - - - - Array2D.createBased 1 1 2 3 1 - - Evaluates to a 2x3 1-based array with contents [[1; 1; 1]; [1; 1; 1]] - - - - - Creates a based array given the dimensions and a generator function to compute the elements. - - The base for the first dimension of the array. - The base for the second dimension of the array. - The length of the first dimension of the array. - The length of the second dimension of the array. - A function to produce elements of the array given the two indices. - - The created array. - Thrown when base1, base2, length1, or length2 is negative. - - - - Array2D.initBased 1 1 2 3 (fun i j -> i + j) - - Evaluates to a 2x3 1-based array with contents [[2; 3; 4]; [3; 4; 5]] - - - - - Creates an array where the entries are initially Unchecked.defaultof<'T>. - - The length of the first dimension of the array. - The length of the second dimension of the array. - - The created array. - Thrown when length1 or length2 is negative. - - - - Array2D.zeroCreate 2 3 - - Evaluates to a 2x3 array with contents [[0; 0; 0]; [0; 0; 0]] - - - - - Creates an array whose elements are all initially the given value. - - The length of the first dimension of the array. - The length of the second dimension of the array. - The value to populate the new array. - - The created array. - Thrown when length1 or length2 is negative. - - - - Array2D.create 2 3 1 - - Evaluates to a 2x3 array with contents [[1; 1; 1]; [1; 1; 1]] - - - - - Creates an array given the dimensions and a generator function to compute the elements. - - The length of the first dimension of the array. - The length of the second dimension of the array. - A function to produce elements of the array given the two indices. - - The generated array. - Thrown when either of the lengths is negative. - - - - Array2D.init 2 3 (fun i j -> i + j) - - Evaluates to a 2x3 array with contents [[0; 1; 2]; [1; 2; 3]] - - - - - Reads a range of elements from the first array and write them into the second. - - The source array. - The first-dimension index to begin copying from in the source array. - The second-dimension index to begin copying from in the source array. - The target array. - The first-dimension index to begin copying into in the target array. - The second-dimension index to begin copying into in the target array. - The number of elements to copy across the first dimension of the arrays. - The number of elements to copy across the second dimension of the arrays. - Thrown when any of the indices are negative or if either of - the counts are larger than the dimensions of the array allow. - - - Slicing syntax is generally preferred, e.g. - - let source = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - let target = array2D [ [ 2; 2; 2 ]; [ 12; 12; 12 ] ] - target[0..1,1..2] <- source - - - - - - let source = array2D [ [ 3; 4 ]; [ 13; 14 ] ] - let target = array2D [ [ 2; 2; 2 ]; [ 12; 12; 12 ] ] - - Array2D.blit source 0 0 target 0 1 2 2 - - After evaluation target contains [ [ 2; 3; 4 ]; [ 12; 13; 14 ] ]. - - - - Builds 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 propagated to the output - array. - - The input array. - - A copy of the input array. - - - - open System - - let array = Array2D.zeroCreate<int> 10 10 - - array |> Array2D.copy - - Evaluates to a new copy of the 10x10 array. - - - - Fetches the base-index for the second dimension of the array. - - The input array. - - The base-index of the second dimension of the array. - - Create a 10x10 1-based array: - - open System - - let array = Array.CreateInstance(typeof<int>, [| 10; 10 |], [| 1; 1 |]) :?> int[,] - - array |> Array2D.base2 - - Evaluates to 1. - - - - Fetches the base-index for the first dimension of the array. - - The input array. - - The base-index of the first dimension of the array. - - Create a 10x10 1-based array: - - open System - - let array = Array.CreateInstance(typeof<int>, [| 10; 10 |], [| 1; 1 |]) :?> int[,] - - array |> Array2D.base1 - - Evaluates to 1. - - - - Contains operations for working with 2-dimensional arrays. - - - See also F# Language Guide - Arrays. - - F# and CLI multi-dimensional arrays are typically zero-based. - However, CLI 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 propagated to a matching output - array on the Array2D.map and Array2D.mapi operations. - Non-zero-based arrays can also be created using Array2D.zeroCreateBased, - Array2D.createBased and Array2D.initBased. - - - - Get an implementation of equality semantics using the given functions. - - A function to generate a hash code from a value. - A function to test equality of two values. - - An object implementing using the given functions. - - Create a dictionary which uses the given functions for equality and hashing: - - open System.Collections.Generic - - let modIdentity = HashIdentity.FromFunctions((fun i -> i%5), (fun i1 i2 -> i1%5 = i2%5)) - let dict = new Dictionary<int,int>(HashIdentity.FromFunctions) - - dict.[2] <- 6 - dict.[7] <- 10 - - In this example, only one entry is added, as the keys 2 and 7 have the same hash and are equal according to the provided functions. - - - - Get an implementation of equality semantics using reference equality and reference hashing. - - - An object implementing using - and . - - - Create a dictionary which uses reference equality and hashing on the key, giving each key reference identity: - - open System.Collections.Generic - - let dict = new Dictionary<int[],int>(HashIdentity.Structural) - - let arr1 = [| 1;2;3 |] - let arr2 = [| 1;2;3 |] - dict.Add(arr1, 6) - dict.Add(arr2, 7) - - In this example, two entries are added to the dictionary, as the arrays have different object reference identity. - - - - Get an implementation of equality semantics semantics using limited structural equality and structural hashing. - - The limit on the number of hashing operations used. - - An object implementing . - - Create a dictionary which uses limited structural equality and structural hashing on the key, allowing trees as efficient keys: - - open System.Collections.Generic - - type Tree = Tree of int * Tree list - - let dict = new Dictionary<Tree,int>(HashIdentity.LimitedStructural 4) - - let tree1 = Tree(0, []) - let tree2 = Tree(0, [tree1; tree1]) - dict.Add(tree1, 6) - dict.Add(tree2, 7) - - - - - Get an implementation of equality semantics using non-structural equality and non-structural hashing. - - - An object implementing using - and . - - - Create a dictionary which uses non-structural equality and hashing on the key: - - open System.Collections.Generic - - let dict = new Dictionary<System.DateTime,int>(HashIdentity.NonStructural) - - dict.Add(System.DateTime.Now, 1) - - - - - Get an implementation of equality semantics using structural equality and structural hashing. - - An object implementing using and . - - Create a dictionary which uses structural equality and structural hashing on the key, allowing an array as a key: - - open System.Collections.Generic - - let dict = new Dictionary<int[],int>(HashIdentity.Structural) - - let arr1 = [| 1;2;3 |] - let arr2 = [| 1;2;3 |] - - dict.[arr1] <- 6 - dict.[arr2] >- 7 - - In this example, only one entry is added to the dictionary, as the arrays identical by structural equality. - - - - Common notions of value identity implementing the - interface, for constructing objects and other collections - - - Get an implementation of comparison semantics using the given function. - - A function to compare two values. - - An object implementing using the supplied function. - - Create and use a comparer using the given function: - - let comparer = ComparisonIdentity.FromFunction(fun i1 i2 -> compare (i1%5) (i2%5)) - - comparer.Compare(7, 2) - - Evaluates to 0because 7 and 2 compare as equal using to the provided function. - - - - Get an implementation of comparison semantics using non-structural comparison. - - An object implementing using . - - Create and use a comparer using structural comparison: - - let comparer = ComparisonIdentity.NonStructural<System.DateTime> - - comparer.Compare(System.DateTime.Now, System.DateTime.Today) - - Evaluates to 1. - - - - Get an implementation of comparison semantics using structural comparison. - - An object implementing using . - - Create and use a comparer using structural comparison: - - let compareTuples = ComparisonIdentity.Structural<int * int> - - compareTuples.Compare((1, 4), (1, 5)) - - Evaluates to -1. - - - - Common notions of value ordering implementing the - interface, for constructing sorted data structures and performing sorting operations. - - - Return a new sequence with new items inserted before the given index. - - The index where the items should be inserted. - The values to insert. - The input sequence. - - The result sequence. - - Thrown when index is below 0 or greater than source.Length. - - - - seq { 0; 1; 2 } |> Seq.insertManyAt 1 [8; 9] - - Evaluates to a sequence yielding the same results as seq { 0; 8; 9; 1; 2 }. - - - - Return a new sequence with a new item inserted before the given index. - - The index where the item should be inserted. - The value to insert. - The input sequence. - - The result sequence. - - Thrown when index is below 0 or greater than source.Length. - - - - seq { 0; 1; 2 } |> Seq.insertAt 1 9 - - Evaluates to a sequence yielding the same results as seq { 0; 9; 1; 2 }. - - - - Return a new sequence with the item at a given index set to the new value. - - The index of the item to be replaced. - The new value. - The input sequence. - - The result sequence. - - Thrown when index is outside 0..source.Length - 1 - - - - seq { 0; 1; 2 } |> Seq.updateAt 1 9 - - Evaluates to a sequence yielding the same results as seq { 0; 9; 2 }. - - - - Return a new sequence with the number of items starting at a given index removed. - - The index of the item to be removed. - The number of items to remove. - The input sequence. - - The result sequence. - - Thrown when index is outside 0..source.Length - count - - - - seq { 0; 1; 2; 3 } |> Seq.removeManyAt 1 2 - - Evaluates to a sequence yielding the same results as seq { 0; 3 }. - - - - Return a new sequence with the item at a given index removed. - - The index of the item to be removed. - The input sequence. - - The result sequence. - - Thrown when index is outside 0..source.Length - 1 - - - - seq { 0; 1; 2 } |> Seq.removeAt 1 - - Evaluates to a sequence yielding the same results as seq { 0; 2 }. - - - - Combines the three sequences into a sequence of triples. The sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other - sequences are ignored. - - The first input sequence. - The second input sequence. - The third input sequence. - - The result sequence. - - Thrown when any of the input sequences is null. - - - - let numbers = [1; 2] - let names = ["one"; "two"] - let roman = ["I"; "II"] - - Seq.zip3 numbers names roman - - Evaluates to a sequence yielding the same results as seq { (1, "one", "I"); (2, "two", "II") }. - - - - Combines the two sequences into a sequence of pairs. The two sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other - sequence are ignored. - - The first input sequence. - The second input sequence. - - The result sequence. - - Thrown when either of the input sequences is null. - - - - let numbers = [1; 2] - let names = ["one"; "two"] - - Seq.zip numbers names - - Evaluates to a sequence yielding the same results as seq { (1, "one"); (2, "two") }. - - - - Returns a sequence yielding sliding windows containing elements drawn from the input - sequence. Each window is returned as a fresh array. - - The number of elements in each window. - The input sequence. - - The result sequence. - Thrown when the input sequence is null. - Thrown when windowSize is not positive. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.windowed 3 - - Evaluates to a sequence of arrays yielding the results seq { [| 1; 2; 3 |]; [| 2; 3; 4 |]; [| 3; 4; 5 |] } - - - - Returns 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. - - The stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. - - A function that takes in the current state and returns an option tuple of the next - element of the sequence and the next state value. - The initial state value. - - The result sequence. - - - - 1 |> Seq.unfold (fun state -> if state > 100 then None else Some (state, state * 2)) - - Evaluates to a sequence yielding the same results as seq { 1; 2; 4; 8; 16; 32; 64 } - - - - - 1I |> Seq.unfold (fun state -> Some (state, state * 2I)) - - Evaluates to an infinite sequence yielding the results seq { 1I; 2I; 4I; 8I; ... } - - - - Returns a sequence that when enumerated returns at most N elements. - - The maximum number of items to enumerate. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.truncate 2 - - Evaluates to a sequence yielding the same results as seq { "a"; "b" } - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.truncate 6 - - Evaluates to a sequence yielding the same results as seq { "a"; "b"; "c"; "d" } - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.truncate 0 - - Evaluates to the empty sequence. - - - - Returns the transpose of the given sequence of sequences. - - 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 input sequence. - - The transposed sequence. - - Thrown when the input sequence is null. - - - - let inputs = - [ [ 10; 20; 30 ] - [ 11; 21; 31 ] ] - - inputs |> Seq.transpose - - Evaluates to a sequence of sequences yielding the same results as [ [10; 11]; [20; 21]; [30; 31] ]. - - - - Applies the given function to successive elements, returning the first - result where the function returns "Some(x)". - - A function that transforms items from the input sequence into options. - The input sequence. - - The chosen element or None. - - Thrown when the input sequence is null. - - - - let input = [1; 2; 3] - - input |> Seq.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to Some "2". - - - - - let input = [1; 2; 3] - - input |> Seq.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Evaluates to None. - - - - Returns the index of the last element in the sequence - that satisfies the given predicate. Return None if no such element exists. - - This function digests the whole initial sequence as soon as it is called. As a - result this function should not be used with large or infinite sequences. - - A function that evaluates to a Boolean when given an item in the sequence. - The input sequence. - - The found index or None. - - Thrown when the input sequence is null. - - Try to find the index of the first even number from the back: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 3 - - - Try to find the index of the first even number from the back: - - let inputs = [1; 3; 5; 7] - - inputs |> Seq.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Tries to find the nth element in the sequence. - Returns None if index is negative or the input sequence does not contain enough elements. - - The index of element to retrieve. - The input sequence. - - The nth element of the sequence or None. - Thrown when the input sequence is null. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.tryItem 1 - - Evaluates to Some "b". - - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.tryItem 4 - - Evaluates to None. - - - - Returns the index of the first element in the sequence - that satisfies the given predicate. Return None if no such element exists. - - A function that evaluates to a Boolean when given an item in the sequence. - The input sequence. - - The found index or None. - - Thrown when the input sequence is null. - - Try to find the index of the first even number: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to Some 1 - - - Try to find the index of the first even number: - - let inputs = [1; 3; 5; 7] - - inputs |> Seq.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the last element for which the given function returns True. - Return None if no such element exists. - - This function digests the whole initial sequence as soon as it is called. As a - result this function should not be used with large or infinite sequences. - - A function that evaluates to a Boolean when given an item in the sequence. - The input sequence. - - The found element or None. - - Thrown when the input sequence is null. - - Try to find the first even number from the back: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 4 - - - Try to find the first even number from the back: - - let inputs = [1; 5; 3] - - inputs |> Seq.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the first element for which the given function returns True. - Return None if no such element exists. - - A function that evaluates to a Boolean when given an item in the sequence. - The input sequence. - - The found element or None. - - Thrown when the input sequence is null. - - Try to find the first even number: - - let inputs = [1; 2; 3] - - inputs |> Seq.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to Some 2 - - - Try to find the first even number: - - let inputs = [1; 5; 3] - - inputs |> Seq.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Builds a list from the given collection. - - The input sequence. - - The result list. - - Thrown when the input sequence is null. - - - - let inputs = seq { 1; 2; 5 } - - inputs |> Seq.toList - - Evaluates to [ 1; 2; 5 ]. - - - - Builds an array from the given collection. - - The input sequence. - - The result array. - - Thrown when the input sequence is null. - - - - let inputs = seq { 1; 2; 5 } - - inputs |> Seq.toArray - - Evaluates to [| 1; 2; 5 |]. - - - - Returns a sequence that, when iterated, yields elements of the underlying sequence while the - given predicate returns True, and then returns no further elements. - - A function that evaluates to false when no more items should be returned. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "bb"; "ccc"; "d"] - - inputs |> Seq.takeWhile (fun x -> x.Length < 3) - - Evaluates to a sequence yielding the same results as seq { "a"; "bb" } - - - - Returns the first N elements of the sequence. - - Throws InvalidOperationException - if the count exceeds the number of elements in the sequence. Seq.truncate - returns as many items as the sequence contains instead of throwing an exception. - - The number of items to take. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty and the count is greater than zero. - Thrown when count exceeds the number of elements - in the sequence. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.take 2 - - Evaluates to a sequence yielding the same results as ["a"; "b"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.take 6 - - Throws InvalidOperationException. - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.take 0 - - Evaluates to a sequence yielding no results. - - - - Returns a sequence that skips 1 element of the underlying sequence and then yields the - remaining elements of the sequence. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = ["a"; "bb"; "ccc"] - - inputs |> Seq.tail - - Evaluates to a sequence yielding the same results as seq { "bb"; "ccc" } - - - - - Returns 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. - - A function to transform items from the input sequence into the type that will be summed. - The input sequence. - - The computed sum. - - - - let input = [ "aa"; "bbb"; "cc" ] - - input |> Seq.sumBy (fun s -> s.Length) - - Evaluates to 7. - - - - Returns the sum of the elements in the sequence. - - The elements are summed using the + operator and Zero property associated with the generated type. - - The input sequence. - - The computed sum. - - - - let input = [ 1; 5; 3; 2 ] - - input |> Seq.sum - - Evaluates to 11. - - - - Applies a key-generating function to each element of a sequence and yield a sequence ordered - descending by keys. The keys are compared using generic comparison as implemented by . - - 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. - - This is a stable sort, that is the original order of equal elements is preserved. - - A function to transform items of the input sequence into comparable keys. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = ["a"; "bbb"; "cccc"; "dd"] - - input |> Seq.sortByDescending (fun s -> s.Length) - - Evaluates to a sequence yielding the same results as seq { "cccc"; "bbb"; "dd"; "a" }. - - - - Yields a sequence ordered descending by keys. - - 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. - - This is a stable sort, that is the original order of equal elements is preserved. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = seq { 8; 4; 3; 1; 6; 1 } - - input |> Seq.sortDescending - - Evaluates to a sequence yielding the same results as seq { 8; 6; 4; 3; 1; 1 }. - - - - Applies 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 . - - 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 and uses a stable sort, that is the original order of equal elements is preserved. - - A function to transform items of the input sequence into comparable keys. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = [ "a"; "bbb"; "cccc"; "dd" ] - - input |> Seq.sortBy (fun s -> s.Length) - - Evaluates to a sequence yielding the same results as seq { "a"; "dd"; "bbb"; "cccc" }. - - - - Yields a sequence ordered using the given comparison function. - - 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 and uses a stable sort, that is the original order of equal elements is preserved. - - The function to compare the collection elements. - The input sequence. - - The result sequence. - - Sort a sequence of pairs using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let input = [ (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") ] - - input |> Seq.sortWith compareEntries - - Evaluates to a sequence yielding the same results as seq { (0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb") }. - - - - Yields a sequence ordered by keys. - - 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 and uses a stable sort, that is the original order of equal elements is preserved. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = seq { 8; 4; 3; 1; 6; 1 } - - Seq.sort input - - Evaluates to a sequence yielding the same results as seq { 1; 1 3; 4; 6; 8 }. - - - - Returns 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. - - A function that evaluates an element of the sequence to a boolean value. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = seq { "a"; "bbb"; "cc"; "d" } - - inputs |> Seq.skipWhile (fun x -> x.Length < 3) - - Evaluates a sequence yielding the same results as seq { "bbb"; "cc"; "d" } - - - - Returns a sequence that skips N elements of the underlying sequence and then yields the - remaining elements of the sequence. - - The number of items to skip. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - Thrown when count exceeds the number of elements - in the sequence. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.skip 2 - - Evaluates a sequence yielding the same results as seq { "c"; "d" } - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.skip 5 - - Throws ArgumentException. - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> Seq.skip -1 - - Evaluates a sequence yielding the same results as seq { "a"; "b"; "c"; "d" }. - - - - Returns a sequence yielding one item only. - - The input item. - - The result sequence of one item. - - - - Seq.singleton 7 - - Evaluates to a sequence yielding the same results as seq { 7 }. - - - - Like foldBack, but returns the sequence of intermediary and final results. - - 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. - - - A function that updates the state with each element from the sequence. - The input sequence. - The initial state. - - The resulting sequence of computed states. - - Thrown when the input sequence is null. - - Apply a list charges from back to front, and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [ In 1; Out 2; In 3 ] - - (inputs, 0) ||> Seq.scanBack (fun charge acc -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to a sequence yielding the same results as seq { 2; 1; 3; 0 } by processing each input from back to front. Note 0 is the intial - state, 3 the next state, 1 the next state, and 2 the final state, and the states - are produced from back to front. - - - - Like fold, but computes on-demand and returns the sequence of intermediary and final results. - - A function that updates the state with each element from the sequence. - The initial state. - The input sequence. - - The resulting sequence of computed states. - - Thrown when the input sequence is null. - - Apply a list charges and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = seq { In 1; Out 2; In 3 } - - (0, inputs) ||> Seq.scan (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to a sequence yielding the same results as seq { 0; 1; -1; 2 }. Note 0 is the intial - state, 1 the next state, -1 the next state, and 2 the final state. - - - - Returns a new sequence with the elements in reverse order. - - The input sequence. - - The reversed sequence. - - Thrown when the input sequence is null. - - This function consumes the whole input sequence before yielding the first element of the reversed sequence. - - - - let input = seq { 0; 1; 2 } - - input |> Seq.rev - - Evaluates to a sequence yielding the same results as seq { 2; 1; 0 }. - - - - Applies a function to each element of the sequence, starting from the end, 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)). - - A function that takes in the next-to-last element of the sequence and the - current accumulated result to produce the next accumulated result. - The input sequence. - - The final result of the reductions. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - This function consumes the whole input sequence before returning the result. - - - - let inputs = [1; 3; 4; 2] - - inputs |> Seq.reduceBack (fun a b -> a + b * 10) - - Evaluates to 2431, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10 - - - - Creates a sequence by replicating the given initial value. - - The number of elements to replicate. - The value to replicate - - The generated sequence. - - - - Seq.replicate 3 "a" - - Evaluates to a sequence yielding the same results as seq { "a"; "a"; "a" }. - - - - Applies 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. - - A function that takes in the current accumulated result and the next - element of the sequence to produce the next accumulated result. - The input sequence. - - The final result of the reduction function. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = [1; 3; 4; 2] - - inputs |> Seq.reduce (fun a b -> a * 10 + b) - - Evaluates to 1342, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2 - - - - Builds a new sequence object that delegates to the given sequence object. This ensures - the original sequence cannot 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 cannot cast the returned sequence object to an array. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let input = [| 1; 2; 3 |] - - input |> Seq.readonly - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 }. - - - - - let input = [| 1; 2; 3 |] - - let readonlyView = input |> Seq.readonly - - (readonlyView :?> int[]).[1] <- 4 - - Throws an InvalidCastException. - - - - Applies the given function to successive elements, returning the first - x where the function returns "Some(x)". - - A function to transform each item of the input sequence into an option of the output type. - The input sequence. - - The selected element. - - Thrown when the input sequence is null. - Thrown when every item of the sequence - evaluates to None when the given function is applied. - - - - let input = [1; 2; 3] - - input |> Seq.pick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to "2". - - - - - let input = [1; 2; 3] - - input |> Seq.pick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Throws KeyNotFoundException. - - - - - Returns a sequence with all elements permuted according to the - specified permutation. - - This function consumes the whole input sequence before yielding the first element of the result sequence. - - The function that maps input indices to output indices. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - Thrown when indexMap does not produce a valid permutation. - - - - let inputs = [1; 2; 3; 4] - - inputs |> Seq.permute (fun x -> (x + 1) % 4) - - Evaluates to a sequence yielding the same results as seq { 4; 1; 2; 3 }. - - - - Returns 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. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = seq { 1; 2; 3; 4 } - - inputs |> Seq.pairwise - - Evaluates to a sequence yielding the same results as seq { (1, 2); (2, 3); (3, 4) }. - - - - Views the given list as a sequence. - - The input list. - - The result sequence. - - - - let inputs = [ 1; 2; 5 ] - - inputs |> Seq.ofList - - Evaluates to a sequence yielding the same results as seq { 1; 2; 5 }. - - - - Views the given array as a sequence. - - The input array. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [| 1; 2; 5 |] - - inputs |> Seq.ofArray - - Evaluates to a sequence yielding the same results as seq { 1; 2; 5 }. - - - - Computes the nth element in the collection. - - The index of element to retrieve. - The input sequence. - - The nth element of the sequence. - - Thrown when the input sequence is null. - Thrown when the index is negative or the input sequence does not contain enough elements. - - - Returns the lowest of all elements of the sequence, compared via Operators.min on the function result. - - A function to transform items from the input sequence into comparable keys. - The input sequence. - - The smallest element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = [ "aaa"; "b"; "cccc" ] - - inputs |> Seq.minBy (fun s -> s.Length) - - Evaluates to "b" - - - - - let inputs = [] - - inputs |> Seq.minBy (fun (s: string) -> s.Length) - - Throws System.ArgumentException. - - - - Returns the lowest of all elements of the sequence, compared via Operators.min. - - The input sequence. - - The smallest element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = [10; 12; 11] - - inputs |> Seq.min - - Evaluates to 10 - - - - - let inputs = [] - - inputs |> Seq.min - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the sequence, compared via Operators.max on the function result. - - A function to transform items from the input sequence into comparable keys. - The input sequence. - - The largest element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - - - let inputs = ["aaa"; "b"; "cccc"] - - inputs |> Seq.maxBy (fun s -> s.Length) - - Evaluates to "cccc" - - - - - let inputs = [ ] - - inputs |> Seq.maxBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the sequence, compared via Operators.max - - The input sequence. - - Thrown when the input sequence is null. - Thrown when the input sequence is empty. - - The largest element of the sequence. - - - - let inputs = [ 10; 12; 11 ] - - inputs |> Seq.max - - Evaluates to 12 - - - - - let inputs = [ ] - - inputs |> Seq.max - - Throws System.ArgumentException. - - - - Builds 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. The integer index passed to the - function indicates the index (from 0) of element being transformed. - - A function to transform pairs of items from the input sequences that also supplies the current index. - The first input sequence. - The second input sequence. - - The result sequence. - - Thrown when either of the input sequences is null. - - - - let inputs1 = ["a"; "bad"; "good"] - let inputs2 = [0; 2; 1] - - (inputs1, inputs2) ||> Seq.mapi2 (fun i x y -> i, x[y]) - - Evaluates to a sequence yielding the same results as seq { (0, 'a'); (1, 'd'); (2, 'o') } - - - - Builds 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. - - A function to transform items from the input sequence that also supplies the current index. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [ 10; 10; 10 ] - - inputs |> Seq.mapi (fun i x -> i + x) - - Evaluates to a sequence yielding the same results as seq { 10; 11; 12 } - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding triples of elements from the three sequences. If one input sequence if shorter than - the others then the remaining elements of the longer sequences are ignored. - - The function to transform triples of elements from the input sequences. - The first input sequence. - The second input sequence. - The third input sequence. - - The result sequence. - - Thrown when any of the input sequences is null. - - - - let inputs1 = [ "a"; "t"; "ti" ] - let inputs2 = [ "l"; "h"; "m" ] - let inputs3 = [ "l"; "e"; "e" ] - - (inputs1, inputs2, inputs3) |||> Seq.map3 (fun x y z -> x + y + z) - - Evaluates to a sequence yielding the same results as seq { "all"; "the"; "time" } - - - - - Combines map and foldBack. Builds a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The function is also used to accumulate a final value. - - This function digests the whole initial sequence as soon as it is called. As a result this function should - not be used with large or infinite sequences. - - The function to transform elements from the input collection and accumulate the final value. - The input collection. - The initial state. - - Thrown when the input collection is null. - - The collection of transformed elements, and the final accumulated value. - - Accumulate the charges from back to front, and double them as well - - type Charge = - | In of int - | Out of int - - let inputs = seq { In 1; Out 2; In 3 } - - let newCharges, balance = - (inputs, 0) ||> Seq.mapFoldBack (fun charge acc -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to seq { In 2; Out 4; In 6 } and balance to 2. - - - - Combines map and fold. Builds a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The function is also used to accumulate a final value. - - This function digests the whole initial sequence as soon as it is called. As a result this function should - not be used with large or infinite sequences. - - The function to transform elements from the input collection and accumulate the final value. - The initial state. - The input collection. - - Thrown when the input collection is null. - - The collection of transformed elements, and the final accumulated value. - - - Accumulate the charges, and double them as well - type Charge = - | In of int - | Out of int - - let inputs = seq { In 1; Out 2; In 3 } - - let newCharges, balance = - (0, inputs) ||> Seq.mapFold (fun acc charge -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to seq { In 2; Out 4; In 6 } and balance to 2. - - - - Builds 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. - - A function to transform pairs of items from the input sequences. - The first input sequence. - The second input sequence. - - The result sequence. - - Thrown when either of the input sequences is null. - - - - let inputs1 = ["a"; "bad"; "good"] - let inputs2 = [0; 2; 1] - - (inputs1, inputs2) ||> Seq.map2 (fun x y -> x.[y]) - - Evaluates to a sequence yielding the same results as seq { 'a'; 'd'; 'o' } - - - - Builds 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. - - A function to transform items from the input sequence. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "bbb"; "cc"] - - inputs |> Seq.map (fun x -> x.Length) - - Evaluates to a sequence yielding the same results as seq { 1; 3; 2 } - - - - Returns the length of the sequence - - The input sequence. - - The length of the sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.length - - Evaluates to 3 - - - - Applies 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. The integer passed to the - function indicates the index of element. - - A function to apply to each pair of elements from the input sequences along with their index. - The first input sequence. - The second input sequence. - - Thrown when either of the input sequences is null. - - - - let inputs1 = ["a"; "b"; "c"] - let inputs2 = ["banana"; "pear"; "apple"] - - (inputs1, inputs2) ||> Seq.iteri2 (fun i s1 s2 -> printfn "Index {i}: {s1} - {s2}") - - Evaluates to unit and prints - - Index 0: a - banana - Index 1: b - pear - Index 2: c - apple - - in the console. - - - - Applies 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. - - A function to apply to each pair of elements from the input sequences. - The first input sequence. - The second input sequence. - - Thrown when either of the input sequences is null. - - - - let inputs1 = ["a"; "b"; "c"] - let inputs2 = [1; 2; 3] - - (inputs1, inputs2) ||> Seq.iter2 (printfn "%s: %i") - - Evaluates to unit and prints - - a: 1 - b: 2 - c: 3 - - in the console. - - - - Applies the given function to each element of the collection. The integer passed to the - function indicates the index of element. - - A function to apply to each element of the sequence that can also access the current index. - The input sequence. - - Thrown when the input sequence is null. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.iteri (fun i v -> printfn "{i}: {v}") - - - Evaluates to unit and prints - - 0: a - 1: b - 2: c - - in the console. - - - - Applies the given function to each element of the collection. - - A function to apply to each element of the sequence. - The input sequence. - - Thrown when the input sequence is null. - - - - ["a"; "b"; "c"] |> Seq.iter (printfn "%s") - - Evaluates to unit and prints - - a - b - c - - in the console. - - - - Computes the element at the specified index in the collection. - - The index of the element to retrieve. - The input sequence. - - The element at the specified index of the sequence. - - Thrown when the input sequence is null. - Thrown when the index is negative or the input sequence does not contain enough elements. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.item 1 - - Evaluates to "b" - - - - - let inputs = ["a"; "b"; "c"] - - inputs |> Seq.item 4 - - Throws ArgumentException - - - - Generates 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, that is 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. - Iteration can continue up to Int32.MaxValue. - - A function that generates an item in the sequence from a given index. - - The result sequence. - - - - (+) 5 |> Seq.initInfinite - - Evaluates to a sequence yielding the same results as seq { 5; 6; 7; 8; ... } - - - - Generates a new sequence which, when iterated, will return successive - elements by calling the given function, up to the given count. Each element is saved after its - initialization. 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. - - The maximum number of items to generate for the sequence. - A function that generates an item in the sequence from a given index. - - The result sequence. - - Thrown when count is negative. - - - - Seq.init 4 (fun v -> v + 5) - - Evaluates to a sequence yielding the same results as seq { 5; 6; 7; 8 } - - - - - Seq.init -5 (fun v -> v + 5) - - Throws ArgumentException - - - - Builds a new collection whose elements are the corresponding elements of the input collection - paired with the integer index (from 0) of each element. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - ["a"; "b"; "c"] |> Seq.indexed - - Evaluates to a sequence yielding the same results as seq { (0, "a"); (1, "b"); (2, "c") } - - - - Returns true if the sequence contains no elements, false otherwise. - - The input sequence. - - True if the sequence is empty; false otherwise. - - Thrown when the input sequence is null. - - - - [] |> Seq.isEmpty - - Evaluates to true - - - - - ["pear"; "banana"] |> Seq.isEmpty - - Evaluates to false - - - - Returns the only element of the sequence or None if sequence is empty or contains more than one element. - - The input sequence. - - The only element of the sequence or None. - - Thrown when the input sequence is null. - - - - let inputs = ["banana"] - - inputs |> Seq.tryExactlyOne - - Evaluates to Some banana - - - - - let inputs = ["pear"; "banana"] - - inputs |> Seq.tryExactlyOne - - Evaluates to None - - - - - [] |> Seq.tryExactlyOne - - Evaluates to None - - - - Returns the only element of the sequence. - - The input sequence. - - The only element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input does not have precisely one element. - - - - let inputs = ["banana"] - - inputs |> Seq.exactlyOne - - Evaluates to banana - - - - - let inputs = ["pear"; "banana"] - - inputs |> Seq.exactlyOne - - Throws ArgumentException - - - - - [] |> Seq.exactlyOne - - Throws ArgumentException - - - - Returns the last element of the sequence. - Return None if no such element exists. - - The input sequence. - - The last element of the sequence or None. - - Thrown when the input sequence is null. - - - - ["pear"; "banana"] |> Seq.tryLast - - Evaluates to Some "banana" - - - - - [] |> Seq.tryLast - - Evaluates to None - - - - Returns the last element of the sequence. - - The input sequence. - - The last element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input does not have any elements. - - - - ["pear"; "banana"] |> Seq.last - - Evaluates to banana - - - - - [] |> Seq.last - - Throws ArgumentException - - - - Returns the first element of the sequence, or None if the sequence is empty. - - The input sequence. - - The first element of the sequence or None. - - Thrown when the input sequence is null. - - - - ["banana"; "pear"] |> Seq.tryHead - - Evaluates to Some "banana" - - - - - [] |> Seq.tryHead - - Evaluates to None - - - - Returns the first element of the sequence. - - The input sequence. - - The first element of the sequence. - - Thrown when the input sequence is null. - Thrown when the input does not have any elements. - - - - let inputs = ["banana"; "pear"] - - inputs |> Seq.head - - Evaluates to banana - - - - - [] |> Seq.head - - Throws ArgumentException - - - - Applies a key-generating function to each element of a sequence and yields a sequence of - unique keys. Each unique key contains a sequence of all elements that match - to this key. - - 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. - - A function that transforms an element of the sequence into a comparable key. - The input sequence. - - The result sequence. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.groupBy (fun n -> n % 2) - - Evaluates to a sequence yielding the same results as seq { (1, seq { 1; 3; 5 }); (0, seq { 2; 4 }) } - - - - Tests the all pairs of elements drawn from the two sequences satisfy the - given predicate. If one sequence is shorter than - the other then the remaining elements of the longer sequence are ignored. - - A function to test pairs of elements from the input sequences. - The first input sequence. - The second input sequence. - - True if all pairs satisfy the predicate; false otherwise. - - Thrown when either of the input sequences is null. - - - - let inputs1 = [1; 2; 3; 4; 5; 6] - let inputs2 = [1; 2; 3; 4; 5] - - (inputs1, inputs2) ||> Seq.forall2 (=) - - Evaluates to true. - - - - - let items1 = [2017; 1; 1] - let items2 = [2019; 19; 8] - - (items1, items2) ||> Seq.forall2 (=) - - Evaluates to false. - - - - Tests 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. - - A function to test an element of the input sequence. - The input sequence. - - True if every element of the sequence satisfies the predicate; false otherwise. - - Thrown when the input sequence is null. - - - - let isEven a = a % 2 = 0 - - [2; 42] |> Seq.forall isEven // evaluates to true - - [1; 2] |> Seq.forall isEven // evaluates to false - - - - - Applies a function to corresponding elements of two collections, starting from the end of the shorter collection, - threading an accumulator argument through the computation. The two sequences need not have equal lengths. - If the input function is f and the elements are i0...iN and j0...jM, N < M - then computes f i0 j0 (... (f iN jN s)...). - - The function to update the state given the input elements. - The first input sequence. - The second input sequence. - The initial state. - - The final state value. - - Thrown when the either of the input sequences is null. - - - This function consumes the whole of both inputs sequences before returning the result. As a - result this function should not be used with large or infinite sequences. - - - - - type Count = - { Positive: int - Negative: int - Text: string } - - let inputs1 = [-1; -2; -3] - let inputs2 = [3; 2; 1; 0] - let initialState = {Positive = 0; Negative = 0; Text = ""} - - (inputs1, inputs2, initialState) |||> Seq.foldBack2 (fun a b acc -> - let text = acc.Text + "(" + string a + "," + string b + ") " - if a + b >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text } - ) - - Evaluates to - - { Positive = 2 - Negative = 1 - Text = " (-3,1) (-2,2) (-1,3)" } - - - - - Applies a function to each element of the collection, starting from the end, 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)...) - - The function to update the state given the input elements. - The input sequence. - The initial state. - - The state object after the folding function is applied to each element of the sequence. - - Thrown when the input sequence is null. - - This function consumes the whole input sequence before returning the result. - - - - type Count = - { Positive: int - Negative: int - Text: string } - - let sequence = [1; 0; -1; -2; 3] - let initialState = {Positive = 0; Negative = 0; Text = ""} - - (sequence, initialState) ||> Seq.foldBack (fun a acc -> - let text = acc.Text + " " + string a - if a >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text }) - - Evaluates to - - { Positive = 2 - Negative = 3 - Text = " 3 -2 -1 0 1" } - - - - - Applies a function to corresponding elements of two collections, threading an accumulator argument - through the computation. - - The two sequences need not have equal lengths: - when one sequence is exhausted any remaining elements in the other sequence are ignored. - If the input function is f and the elements are i0...iN and j0...jN - then computes f (... (f s i0 j0)...) iN jN. - - The function to update the state given the input elements. - The initial state. - The first input sequence. - The second input sequence. - - The final state value. - - Thrown when the either of the input sequences is null. - - - - type CoinToss = Head | Tails - - let data1 = [Tails; Head; Tails] - let data2 = [Tails; Head; Head] - - (0, data1, data2) |||> Seq.fold2 (fun acc a b -> - match (a, b) with - | Head, Head -> acc + 1 - | Tails, Tails -> acc + 1 - | _ -> acc - 1) - - Evaluates to 1 - - - - Applies a function to each element of the collection, threading an accumulator argument - through the computation. If the input function is f and the elements are i0...iN - then computes f (... (f s i0)...) iN - - A function that updates the state with each element from the sequence. - The initial state. - The input sequence. - - The state object after the folding function is applied to each element of the sequence. - - Thrown when the input sequence is null. - - - - type Charge = - | In of int - | Out of int - - let inputs = [In 1; Out 2; In 3] - - (0, inputs) ||> Seq.fold (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to 2 - - - - Returns the index of the last element for which the given function returns True. - - This function digests the whole initial sequence as soon as it is called. As a - result this function should not be used with large or infinite sequences. - - A function to test whether the index of a particular element should be returned. - The input sequence. - - The index of the last element for which the predicate returns True. - - Thrown if no element returns true when - evaluated by the predicate - Thrown when the input sequence is null - - - - let input = [1; 2; 3; 4; 5] - - input |> Seq.findIndex (fun elm -> elm % 2 = 0) - - Evaluates to 3 - - - - - let input = [1; 2; 3; 4; 5] - - input |> Seq.findIndex (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the index of the first element for which the given function returns True. - - A function to test whether the index of a particular element should be returned. - The input sequence. - - The index of the first element for which the predicate returns True. - - Thrown if no element returns true when - evaluated by the predicate - Thrown when the input sequence is null - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.findIndex (fun elm -> elm % 2 = 0) - - Evaluates to 1 - - - - - let inputs = [1; 2; 3; 4; 5] - inputs |> Seq.findIndex (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the last element for which the given function returns True. - - This function digests the whole initial sequence as soon as it is called. As a - result this function should not be used with large or infinite sequences. - - A function to test whether an item in the sequence should be returned. - The input sequence. - - The last element for which the predicate returns True. - - Thrown if no element returns true when - evaluated by the predicate - Thrown when the input sequence is null - - - - let inputs = [2; 3; 4] - - inputs |> Seq.findBack (fun elm -> elm % 2 = 0) - - Evaluates to 4 - - - - - let inputs = [2; 3; 4] - - inputs |> Seq.findBack (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the first element for which the given function returns True. - - A function to test whether an item in the sequence should be returned. - The input sequence. - - The first element for which the predicate returns True. - - Thrown if no element returns true when - evaluated by the predicate - Thrown when the input sequence is null - - - - let inputs = [1; 2; 3] - - inputs |> Seq.find (fun elm -> elm % 2 = 0) - - Evaluates to 2 - - - - - let inputs = [1; 2; 3] - - inputs |> Seq.find (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns 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. - - A synonym for Seq.filter. - - A function to test whether each item in the input sequence should be included in the output. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - [1; 2; 3; 4] |> Seq.where (fun elm -> elm % 2 = 0) - - Evaluates to a sequence yielding the same results as seq { 2; 4 } - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns "true". This is a synonym for Seq.where. - - 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. - - A function to test whether each item in the input sequence should be included in the output. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [1; 2; 3; 4] - - inputs |> Seq.filter (fun elm -> elm % 2 = 0) - - Evaluates to a sequence yielding the same results as seq { 2; 4 } - - - - Tests 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. - - A function to test each pair of items from the input sequences. - The first input sequence. - The second input sequence. - - True if any result from the predicate is true; false otherwise. - - Thrown when either of the two input sequences is null. - - - - let inputs1 = [1; 2] - let inputs2 = [1; 2; 0] - - (inputs1, inputs2) ||> Seq.exists2 (fun a b -> a > b) - - Evaluates to false - - - - - let inputs1 = [1; 4] - let inputs2 = [1; 3; 5] - - (inputs1, inputs2) ||> Seq.exists2 (fun a b -> a > b) - - Evaluates to true - - - - Tests 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. - - A function to test each item of the input sequence. - The input sequence. - - True if any result from the predicate is true; false otherwise. - - Thrown when the input sequence is null. - - - - let input = [1; 2; 3; 4; 5] - - input |> Seq.exists (fun elm -> elm % 4 = 0) - - Evaluates to true - - - - - let input = [1; 2; 3; 4; 5] - - input |> Seq.exists (fun elm -> elm % 6 = 0) - - Evaluates to false - - - - Returns a new sequence with the distinct elements of the second sequence which do not appear in the first sequence, - using generic hash and equality comparisons to compare values. - - Note that this function returns a sequence that digests the whole of the first input sequence as soon as - the result sequence is iterated. As a result this function should not be used with - large or infinite sequences in the first parameter. The function makes no assumption on the ordering of the first input - sequence. - - A sequence whose elements that also occur in the second sequence will cause those elements to be - removed from the returned sequence. - A sequence whose elements that are not also in first will be returned. - - A sequence that contains the set difference of the elements of two sequences. - - Thrown when either of the two input sequences is null. - - - - let original = [1; 2; 3; 4; 5] - let itemsToExclude = [1; 3; 5] - - original |> Seq.except itemsToExclude - - Evaluates to a sequence yielding the same results as seq { 2; 4 } - - - - Creates an empty sequence. - - An empty sequence. - - - - Seq.empty // Evaluates to seq { } - - - - - Splits the input sequence into at most count chunks. - - 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 maximum number of chunks. - The input sequence. - - The sequence split into chunks. - - Thrown when the input sequence is null. - Thrown when count is not positive. - - This function consumes the whole input sequence before yielding the first element of the result sequence. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.splitInto 3 - - Evaluates to a sequence yielding the same results as seq { [|1; 2|]; [|3; 4|]; [|5|] } - - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> Seq.splitInto -1 - - Throws ArgumentException - - - - Returns 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. - - A function transforming the sequence items into comparable keys. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [{Bar = 1 };{Bar = 1}; {Bar = 2}; {Bar = 3}] - - inputs |> Seq.distinctBy (fun foo -> foo.Bar) - - Evaluates to a sequence yielding the same results as seq { { Bar = 1 }; { Bar = 2 }; { Bar = 3 } } - - - - Returns 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. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - [1; 1; 2; 3] |> Seq.distinct - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 } - - - - Returns a sequence that is built from the given delayed specification of a - sequence. - - The input function is evaluated each time an IEnumerator for the sequence - is requested. - - The generating function for the sequence. - The result sequence. - - - - Seq.delay (fun () -> Seq.ofList [1; 2; 3]) - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 }, executing - the generator function every time is consumed. - - - - Applies a key-generating function to each element of a sequence and returns a sequence yielding unique - keys and their number of occurrences 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. - - A function transforming each item of the input sequence into a key to be - compared against the others. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - type Foo = { Bar: string } - - let inputs = [{Bar = "a"}; {Bar = "b"}; {Bar = "a"}] - - inputs |> Seq.countBy (fun foo -> foo.Bar) - - Evaluates to a sequence yielding the same results as seq { ("a", 2); ("b", 1) } - - - - Tests if the sequence contains the specified element. - - The value to locate in the input sequence. - The input sequence. - - True if the input sequence contains the specified element; false otherwise. - - Thrown when the input sequence is null. - - - - [1; 2] |> Seq.contains 2 // evaluates to true - [1; 2] |> Seq.contains 5 // evaluates to false - - - - - Combines 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. - - The input enumeration-of-enumerations. - - The result sequence. - - Thrown when the input sequence is null. - - - - let inputs = [[1; 2]; [3]; [4; 5]] - - inputs |> Seq.concat - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3; 4; 5 } - - - - Compares two sequences using the given comparison function, element by element. - - A function that takes an element from each sequence and returns an int. - If it evaluates to a non-zero value iteration is stopped and that value is returned. - The first input sequence. - The second input sequence. - - Returns the first non-zero result from the comparison function. If the end of a sequence - is reached it returns a -1 if the first sequence is shorter and a 1 if the second sequence - is shorter. - - Thrown when either of the input sequences - is null. - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 10] - let input2 = [1; 10] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to 0 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 5] - let input2 = [1; 8] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to -1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 11] - let input2 = [1; 13] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 2] - let input2 = [1] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1] - let input2 = [1; 2] - - (input1, input2) ||> Seq.compareWith closerToNextDozen - - Evaluates to -1 - - - - Applies the given function to each element of the sequence and concatenates all the - results. - - Remember sequence is lazy, effects are delayed until it is enumerated. - - A function to transform elements of the input sequence into the sequences - that will then be concatenated. - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - type Foo = { Bar: int seq } - - let input = seq { {Bar = [1; 2]}; {Bar = [3; 4]} } - - input |> Seq.collect (fun foo -> foo.Bar) - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3; 4 } - - - - - let input = [[1; 2]; [3; 4]] - - input |> Seq.collect id - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3; 4 } - - - - Divides the input sequence into chunks of size at most chunkSize. - - The maximum size of each chunk. - The input sequence. - - The sequence divided into chunks. - - Thrown when the input sequence is null. - Thrown when chunkSize is not positive. - - - - [1; 2; 3] |> Seq.chunkBySize 2 - - Evaluates to a sequence yielding the same results as seq { [|1; 2|]; [|3|] } - - - - - [1; 2; 3] |> Seq.chunkBySize -2 - - Throws ArgumentException - - - - Applies the given function to each element of the sequence. Returns - a sequence 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. - - A function to transform items of type T into options of type U. - The input sequence of type T. - - The result sequence. - - Thrown when the input sequence is null. - - - - [Some 1; None; Some 2] |> Seq.choose id - - Evaluates to a sequence yielding the same results as seq { 1; 2 } - - - - - [1; 2; 3] |> Seq.choose (fun n -> if n % 2 = 0 then Some n else None) - - Evaluates to a sequence yielding the same results as seq { 2 } - - - - Wraps 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. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - [box 1; box 2; box 3] |> Seq.cast<int> - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 }, explicitly typed as seq<int>. - - - - Returns a sequence that corresponds to a cached version of the input sequence. - - - The 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. Caching a sequence is typically useful when repeatedly - evaluating items in the original sequence is computationally expensive or if - iterating the sequence causes side-effects that the user does not want to be - repeated multiple times. - - 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. - - 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. - - The input sequence. - - The result sequence. - - Thrown when the input sequence is null. - - - - let fibSeq =(0, 1) |> Seq.unfold (fun (a,b) -> Some(a + b, (b, a + b))) - - let fibSeq3 = fibSeq |> Seq.take 3 |> Seq.cache - fibSeq3 - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3 }, - and it will not do the calculation again when called. - - - - Returns 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. - - A function applied to transform each element of the sequence. - The input sequence. - - The average. - - Thrown when the input sequence is null. - Thrown when the input sequence has zero elements. - - - - type Foo = { Bar: float } - - let input = seq { {Bar = 2.0}; {Bar = 4.0} } - - input |> Seq.averageBy (fun foo -> foo.Bar) - - Evaluates to 3.0 - - - - - type Foo = { Bar: float } - - Seq.empty |> Seq.averageBy (fun (foo: Foo) -> foo.Bar) - - Throws ArgumentException - - - - Returns 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. - - The input sequence. - - The average. - - Thrown when the input sequence is null. - Thrown when the input sequence has zero elements. - - - - [1.0; 2.0; 3.0] |> Seq.average - - Evaluates to 2.0 - - - - - [] |> Seq.average - - Throws ArgumentException - - - - Wraps the two given 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. - - The first sequence. - The second sequence. - - The result sequence. - - Thrown when either of the two provided sequences is - null. - - - - Seq.append [1; 2] [3; 4] - - Evaluates to a sequence yielding the same results as seq { 1; 2; 3; 4 } - - - - Returns a new sequence that contains all pairings of elements from the first and second sequences. - - The first sequence. - The second sequence. - - The result sequence. - - Thrown when either of the input sequences is null. - - - - ([1; 2], [3; 4]) ||> Seq.allPairs - - Evaluates to a sequence yielding the same results as - - seq { (1, 3); (1, 4); (2, 3); (2, 4) } - - - - - Contains operations for working with values of type . - - - Return a new list with new items inserted before the given index. - - The index where the items should be inserted. - The values to insert. - The input list. - - The result list. - - Thrown when index is below 0 or greater than source.Length. - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.insertManyAt 1 [ 8; 9 ] - Evaluates to [ 0; 8; 9; 1; 2 ]. - - - - - Return a new list with a new item inserted before the given index. - - The index where the item should be inserted. - The value to insert. - The input list. - - The result list. - - Thrown when index is below 0 or greater than source.Length. - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.insertAt 1 9 - - Evaluates to [ 0; 9; 1; 2 ]. - - - - Return a new list with the item at a given index set to the new value. - - The index of the item to be replaced. - The new value. - The input list. - - The result list. - - Thrown when index is outside 0..source.Length - 1 - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.updateAt 1 9 - - Evaluates to [ 0; 9; 2 ]. - - - - Return a new list with the number of items starting at a given index removed. - - The index of the item to be removed. - The number of items to remove. - The input list. - - The result list. - - Thrown when index is outside 0..source.Length - count - - - - let inputs = [ 0; 1; 2; 3 ] - - inputs |> List.removeManyAt 1 2 - - Evaluates to [ 0; 3 ]. - - - - Return a new list with the item at a given index removed. - - The index of the item to be removed. - The input list. - - The result list. - - Thrown when index is outside 0..source.Length - 1 - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.removeAt 1 - - let inputs = [ 0; 2 ] - - - - Combines the three lists into a list of triples. The lists must have equal lengths. - - The first input list. - The second input list. - The third input list. - - A single list containing triples of matching elements from the input lists. - - - - let numbers = [1; 2] - let names = ["one"; "two"] - let roman = ["I"; "II"] - - List.zip3 numbers names roman - - Evaluates to [(1, "one", "I"); (2, "two", "II")]. - - - - Combines the two lists into a list of pairs. The two lists must have equal lengths. - - The first input list. - The second input list. - - A single list containing pairs of matching elements from the input lists. - - - - let numbers = [1; 2] - let names = ["one"; "two"] - - List.zip numbers names - - Evaluates to [(1, "one"); (2, "two")]. - - - - Returns a list of sliding windows containing elements drawn from the input - list. Each window is returned as a fresh list. - - The number of elements in each window. - The input list. - - The result list. - - Thrown when windowSize is not positive. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.windowed 3 - - Evaluates to [[1; 2; 3]; [2; 3; 4]; [3; 4; 5]] - - - - Returns a new list containing only the elements of the list - for which the given predicate returns "true" - - The function to test the input elements. - The input list. - - A list containing only the elements that satisfy the predicate. - - This is identical to List.filter. - - Select only the even numbers: - - let inputs = [1; 2; 3; 4] - - inputs |> List.where (fun elm -> elm % 2 = 0) - - Evaluates to [2; 4] - - - - Splits a list of triples into three lists. - - The input list. - - Three lists of split elements. - - - - let inputs = [(1, "one", "I"); (2, "two", "II")] - - let numbers, names, roman = inputs |> List.unzip3 - - Evaluates numbers to [1; 2], names to ["one"; "two"] and roman to ["I"; "II"]. - - - - Splits a list of pairs into two lists. - - The input list. - - Two lists of split elements. - - - - let inputs = [(1, "one"); (2, "two")] - - let numbers, names = inputs |> List.unzip - - Evaluates numbers to [1; 2] and names to ["one"; "two"]. - - - - Returns a list that contains the elements generated by the given computation. - The generator is repeatedly called to build the list until it returns None. - The given initial state argument is passed to the element generator. - - A function that takes in the current state and returns an option tuple of the next - element of the list and the next state value. - The initial state value. - - The result list. - - - - 1 |> List.unfold (fun state -> if state > 100 then None else Some (state, state * 2)) - - Evaluates to [1; 2; 4; 8; 16; 32; 64] - - - - Returns the index of the last element in the list - that satisfies the given predicate. - Return None if no such element exists. - - The function to test the input elements. - The input list. - - The index of the last element for which the predicate returns true, or None if - every element evaluates to false. - - Try to find the index of the first even number from the back: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 3 - - - Try to find the index of the first even number from the back: - - let inputs = [1; 3; 5; 7] - - inputs |> List.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Tries to find the nth element in the list. - Returns None if index is negative or the list does not contain enough elements. - - The index to retrieve. - The input list. - - The value at the given index or None. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> List.tryItem 1 - - Evaluates to Some "b". - - - - - let inputs = ["a"; "b"; "c"] - - inputs |> List.tryItem 4 - - Evaluates to None. - - - - Returns the index of the first element in the list - that satisfies the given predicate. - Return None if no such element exists. - - The function to test the input elements. - The input list. - - The index of the first element for which the predicate returns true, or None if - every element evaluates to false. - - Try to find the index of the first even number: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to Some 1 - - - Try to find the index of the first even number: - - let inputs = [1; 3; 5; 7] - - inputs |> List.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the last element for which the given function returns True. - Return None if no such element exists. - - The function to test the input elements. - The input list. - - The last element for which the predicate returns true, or None if - every element evaluates to false. - - Try to find the first even number from the back: - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 4 - - - Try to find the first even number from the back: - - let inputs = [1; 5; 3] - - inputs |> List.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the first element for which the given function returns True. - Return None if no such element exists. - - The function to test the input elements. - The input list. - - The first element for which the predicate returns true, or None if - every element evaluates to false. - - Try to find the first even number: - - let inputs = [1; 2; 3] - - inputs |> List.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to Some 2 - - - Try to find the first even number: - - let inputs = [1; 5; 3] - - inputs |> List.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Applies 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. - - The function to generate options from the elements. - The input list. - - The first resulting value or None. - - - - let input = [1; 2; 3] - - input |> List.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to Some "2". - - - - - let input = [1; 2; 3] - - input |> List.tryPick (fun n -> if n > 3 then Some (string n) else None) - - Evaluates to None. - - - - - Returns at most N elements in a new list. - - The maximum number of items to return. - The input list. - - The result list. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.truncate 2 - - Evaluates to ["a"; "b"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.truncate 6 - - Evaluates to ["a"; "b"; "c"; "d"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.truncate 0 - - Evaluates to the empty list. - - - - Returns the transpose of the given sequence of lists. - - The input sequence of list. - - The transposed list. - - Thrown when the input sequence is null. - Thrown when the input lists differ in length. - - - - let inputs = - [ [ 10; 20; 30 ] - [ 11; 21; 31 ] ] - - inputs |> List.transpose - - Evaluates to [ [10; 11]; [20; 21]; [30; 31] ]. - - - - Returns the first element of the list, or - None if the list is empty. - - The input list. - - The first element of the list or None. - - - - let inputs = [ "banana"; "pear" ] - - inputs |> List.tryHead - - Evaluates to Some "banana" - - - - - let inputs : int list = [] - - inputs |> List.tryHead - - Evaluates to None - - - - Views the given list as a sequence. - - The input list. - - The sequence of elements in the list. - - - - let inputs = [ 1; 2; 5 ] - - inputs |> List.toSeq - - Evaluates to seq { 1; 2; 5 }. - - - - Builds an array from the given list. - - The input list. - - The array containing the elements of the list. - - - - let inputs = [ 1; 2; 5 ] - - inputs |> List.toArray - - Evaluates to [| 1; 2; 5 |]. - - - - Returns a list that contains all elements of the original list while the - given predicate returns True, and then returns no further elements. - - A function that evaluates to false when no more items should be returned. - The input list. - - The result list. - - - - let inputs = ["a"; "bb"; "ccc"; "d"] - - inputs |> List.takeWhile (fun x -> x.Length < 3) - - Evaluates to ["a"; "bb"] - - - - Returns the first N elements of the list. - Throws InvalidOperationException - if the count exceeds the number of elements in the list. List.truncate - returns as many items as the list contains instead of throwing an exception. - - The number of items to take. - The input list. - - The result list. - - Thrown when the input list is empty. - Thrown when count exceeds the number of elements - in the list. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.take 2 - - Evaluates to ["a"; "b"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.take 6 - - Throws InvalidOperationException. - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.take 0 - - Evaluates to the empty list. - - - - Returns the list after removing the first element. - - The input list. - - Thrown when the list is empty. - - The list after removing the first element. - - - - let inputs = ["a"; "bb"; "ccc"] - - inputs |> List.tail - - Evaluates to ["bb"; "ccc"] - - - - - Returns the sum of the results generated by applying the function to each element of the list. - - The function to transform the list elements into the type to be summed. - The input list. - - The resulting sum. - - - - let input = [ "aa"; "bbb"; "cc" ] - - input |> List.sumBy (fun s -> s.Length) - - Evaluates to 7. - - - - Returns the sum of the elements in the list. - - The input list. - - The resulting sum. - - - - let input = [ 1; 5; 3; 2 ] - - input |> List.sum - - Evaluates to 11. - - - - Sorts the given list in descending order using . - - This is a stable sort, i.e. the original order of equal elements is preserved. - The input list. - - The sorted list. - - - - let input = [8; 4; 3; 1; 6; 1] - - input |> List.sortDescending - - Evaluates to [8; 6; 4; 3; 1; 1]. - - - - Sorts the given list in descending order using keys given by the given projection. Keys are compared using . - - This is a stable sort, i.e. the original order of equal elements is preserved. - The function to transform the list elements into the type to be compared. - The input list. - - The sorted list. - - - - let input = ["a"; "bbb"; "cccc"; "dd"] - - input |> List.sortByDescending (fun s -> s.Length) - - Evaluates to ["cccc"; "bbb"; "dd"; "a"]. - - - - Splits a list into two lists, at the given index. - - The index at which the list is split. - The input list. - - The two split lists. - - Thrown when split index exceeds the number of elements - in the list. - - - - let input = [8; 4; 3; 1; 6; 1] - - let front, back = input |> List.splitAt 3 - - Evaluates front to [8; 4; 3] and back to [1; 6; 1]. - - - - Sorts the given list using . - - This is a stable sort, i.e. the original order of equal elements is preserved. - The input list. - - The sorted list. - - - - let input = [8; 4; 3; 1; 6; 1] - - List.sort input - - Evaluates to [1; 1 3; 4; 6; 8]. - - - - Sorts the given list using keys given by the given projection. Keys are compared using . - - This is a stable sort, i.e. the original order of equal elements is preserved. - The function to transform the list elements into the type to be compared. - The input list. - - The sorted list. - - - - let input = [ "a"; "bbb"; "cccc"; "dd" ] - - input |> List.sortBy (fun s -> s.Length) - - Evaluates to ["a"; "dd"; "bbb"; "cccc"]. - - - - Sorts the given list using the given comparison function. - - This is a stable sort, i.e. the original order of equal elements is preserved. - The function to compare the list elements. - The input list. - - The sorted list. - - Sort a list of pairs using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let input = [ (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") ] - - input |> List.sortWith compareEntries - - Evaluates to [(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")]. - - - - Bypasses elements in a list while the given predicate returns True, and then returns - the remaining elements of the list. - - A function that evaluates an element of the list to a boolean value. - The input list. - - The result list. - - - - let inputs = ["a"; "bbb"; "cc"; "d"] - - inputs |> List.skipWhile (fun x -> x.Length < 3) - - Evaluates to ["bbb"; "cc"; "d"] - - - - - Returns the list after removing the first N elements. - - The number of elements to skip. If the number is 0 or negative the input list is returned. - The input list. - - The list after removing the first N elements. - - Thrown when count exceeds the number of - elements in the list. - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.skip 2 - - Evaluates to ["c"; "d"] - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.skip 5 - - Throws ArgumentException. - - - - - let inputs = ["a"; "b"; "c"; "d"] - - inputs |> List.skip -1 - - Evaluates to ["a"; "b"; "c"; "d"]. - - - - Returns a list that contains one item only. - - The input item. - - The result list of one item. - - - - List.singleton 7 - - Evaluates to [ 7 ]. - - - - Like foldBack, but returns both the intermediary and final results - - The function to update the state given the input elements. - The input list. - The initial state. - - The list of states. - - Apply a list charges from back to front, and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [ In 1; Out 2; In 3 ] - - (inputs, 0) ||> List.scanBack (fun charge acc -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to [2; 1; 3; 0] by processing each input from back to front. Note 0 is the initial - state, 3 the next state, 1 the next state, and 2 the final state, and the states - are produced from back to front. - Note acc is a commonly used abbreviation for "accumulator". - - - - Applies 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. Returns the list of intermediate results and the final result. - - The function to update the state given the input elements. - The initial state. - The input list. - - The list of states. - - Apply a list charges and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [In 1; Out 2; In 3] - - (0, inputs) ||> List.scan (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to [0; 1; -1; 2]. Note 0 is the initial - state, 1 the next state, -1 the next state, and 2 the final state. - Note acc is a commonly used abbreviation for "accumulator". - - - - Returns a new list with the elements in reverse order. - - The input list. - - The reversed list. - - - - let inputs = [ 0; 1; 2 ] - - inputs |> List.rev - - Evaluates to [ 2; 1; 0 ]. - - - - Creates a list by replicating the given initial value. - - The number of elements to replicate. - The value to replicate - - The generated list. - - - - List.replicate 3 "a" - - Evaluates to [ "a"; "a"; "a" ]. - - - - Applies a function to each element of the collection, starting from the end, 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)). - - A function that takes in the next-to-last element of the list and the - current accumulated result to produce the next accumulated result. - The input list. - - Thrown when the list is empty. - - The final result of the reductions. - - - - let inputs = [1; 3; 4; 2] - - inputs |> List.reduceBack (fun a b -> a + b * 10) - - Evaluates to 2431, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10 - - - - 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 if list is empty - - The function to reduce two list elements to a single element. - The input list. - - Thrown when the list is empty. - - The final reduced value. - - - - let inputs = [1; 3; 4; 2] - - inputs |> List.reduce (fun a b -> a * 10 + b) - - Evaluates to 1342, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2 - - - - Returns a list with all elements permuted according to the - specified permutation. - - The function to map input indices to output indices. - The input list. - - The permuted list. - - Thrown when indexMap does not produce a valid permutation. - - - - let inputs = [1; 2; 3; 4] - - inputs |> List.permute (fun x -> (x + 1) % 4) - - Evaluates to [4; 1; 2; 3]. - - - - Applies 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 - - The function to generate options from the elements. - The input list. - - Thrown when the list is empty. - - The first resulting value. - - - - let input = [1; 2; 3] - - input |> List.pick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to "2". - - - - - let input = [1; 2; 3] - - input |> List.pick (fun n -> if n > 3 then Some (string n) else None) - - Throws KeyNotFoundException. - - - - - Splits the collection into two collections, containing the - elements for which the given predicate returns True and False - respectively. Element order is preserved in both of the created lists. - - The function to test the input elements. - The input list. - - A list containing the elements for which the predicate evaluated to true and a list - containing the elements for which the predicate evaluated to false. - - - - let inputs = [1; 2; 3; 4] - - let evens, odds = inputs |> List.partition (fun x -> x % 2 = 0) - - Evaluates evens to [2; 4] and odds to [1; 3]. - - - - Returns a list of each element in the input list and its predecessor, with the - exception of the first element which is only returned as the predecessor of the second element. - - The input list. - - The result list. - - - - let inputs = [1; 2; 3; 4] - - inputs |> List.pairwise - - Evaluates to [(1, 2); (2, 3); (3, 4)]. - - - - Builds a new list from the given enumerable object. - - The input sequence. - - The list of elements from the sequence. - - - - let inputs = seq { 1; 2; 5 } - - inputs |> List.ofSeq - - Evaluates to [ 1; 2; 5 ]. - - - - Builds a list from the given array. - - The input array. - - The list of elements from the array. - - - - let inputs = [| 1; 2; 5 |] - - inputs |> List.ofArray - - Evaluates to [ 1; 2; 5 ]. - - - - Indexes into the list. The first element has index 0. - - The input list. - The index to retrieve. - - The value at the given index. - - Thrown when the index is negative or the input list does not contain enough elements. - - - Returns the lowest of all elements of the list, compared via Operators.min on the function result - - Raises if list is empty. - The function to transform list elements into the type to be compared. - The input list. - - Thrown when the list is empty. - - The minimum value. - - - - let inputs = ["aaa"; "b"; "cccc"] - - inputs |> List.minBy (fun s -> s.Length) - - Evaluates to "b" - - - - - let inputs = [] - - inputs |> List.minBy (fun (s: string) -> s.Length) - - Throws System.ArgumentException. - - - - Returns the lowest of all elements of the list, compared via Operators.min. - - Raises if list is empty - The input list. - - Thrown when the list is empty. - - The minimum value. - - - - let inputs = [10; 12; 11] - - inputs |> List.min - - Evaluates to 10 - - - - - let inputs = [] - - inputs |> List.min - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the list, compared via Operators.max on the function result. - - Raises if list is empty. - The function to transform the list elements into the type to be compared. - The input list. - - Thrown when the list is empty. - - The maximum element. - - - - let inputs = ["aaa"; "b"; "cccc"] - - inputs |> List.maxBy (fun s -> s.Length) - - Evaluates to "cccc" - - - - - let inputs = [] - - inputs |> List.maxBy (fun (s: string) -> s.Length) - - Throws System.ArgumentException. - - - - Return the greatest of all elements of the list, compared via Operators.max. - - Raises if list is empty - The input list. - - Thrown when the list is empty. - - The maximum element. - - - - let inputs = [ 10; 12; 11 ] - - inputs |> List.max - - Evaluates to 12 - - - - - let inputs = [ ] - - inputs |> List.max - - Throws System.ArgumentException. - - - - Like mapi, but mapping corresponding elements from two lists of equal length. - - The function to transform pairs of elements from the two lists and their index. - The first input list. - The second input list. - - The list of transformed elements. - - - - let inputs1 = ["a"; "bad"; "good"] - let inputs2 = [0; 2; 1] - - (inputs1, inputs2) ||> List.mapi2 (fun i x y -> i, x[y]) - - Evaluates to [(0, 'a'); (1, 'd'); (2, 'o')] - - - - Builds 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. - - The function to transform elements and their indices. - The input list. - - The list of transformed elements. - - - - let inputs = [ 10; 10; 10 ] - - inputs |> List.mapi (fun i x -> i + x) - - Evaluates to [ 10; 11; 12 ] - - - - Combines map and foldBack. Builds a new list whose elements are the results of applying the given function - to each of the elements of the input list. The function is also used to accumulate a final value. - - The function to transform elements from the input list and accumulate the final value. - The input list. - The initial state. - - The list of transformed elements, and the final accumulated value. - - Accumulate the charges from back to front, and double them as well - - type Charge = - | In of int - | Out of int - - let charges = [ In 1; Out 2; In 3 ] - - let newCharges, balance = - (charges, 0) ||> List.mapFoldBack (fun charge acc -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to [In 2; Out 4; In 6] and balance to 2. - Note acc is a commonly used abbreviation for "accumulator". - - - - Combines map and fold. Builds a new list whose elements are the results of applying the given function - to each of the elements of the input list. The function is also used to accumulate a final value. - - The function to transform elements from the input list and accumulate the final value. - The initial state. - The input list. - - The list of transformed elements, and the final accumulated value. - - Accumulate the charges, and double them as well - - type Charge = - | In of int - | Out of int - - let inputs = [ In 1; Out 2; In 3 ] - - let newCharges, balance = - (0, inputs) ||> List.mapFold (fun acc charge -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to [In 2; Out 4; In 6] and balance to 2. - Note acc is a commonly used abbreviation for "accumulator". - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding elements of the three collections simultaneously. - - The function to transform triples of elements from the input lists. - The first input list. - The second input list. - The third input list. - - The list of transformed elements. - - - - let inputs1 = [ "a"; "t"; "ti" ] - let inputs2 = [ "l"; "h"; "m" ] - let inputs3 = [ "l"; "e"; "e" ] - - (inputs1, inputs2, inputs3) |||> List.map3 (fun x y z -> x + y + z) - - Evaluates to [ "all"; "the"; "time" ] - - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise. - - The function to transform pairs of elements from the input lists. - The first input list. - The second input list. - - The list of transformed elements. - - - - let inputs1 = ["a"; "bad"; "good"] - let inputs2 = [0; 2; 1] - - (inputs1, inputs2) ||> List.map2 (fun x y -> x.[y]) - - Evaluates to seq ['a'; 'd'; 'o'] - - - - Builds a new collection whose elements are the results of applying the given function - to each of the elements of the collection. - - The function to transform elements from the input list. - The input list. - - The list of transformed elements. - - - - let inputs = [ "a"; "bbb"; "cc" ] - - inputs |> List.map (fun x -> x.Length) - - Evaluates to [ 1; 3; 2 ] - - - - Returns the last element of the list. - Return None if no such element exists. - - The input list. - - The last element of the list or None. - - - - [ "pear"; "banana" ] |> List.tryLast - - Evaluates to Some "banana" - - - - - [ ] |> List.tryLast - - Evaluates to None - - - - Returns the length of the list. - - The input list. - - The length of the list. - - The notation array.Length is preferred. - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.length - - Evaluates to 3 - - - - Returns the last element of the list. - - The input list. - - The last element of the list. - - Thrown when the input does not have any elements. - - - - [ "pear"; "banana" ] |> List.last - - Evaluates to banana - - - - - [ ] |> List.last - - Throws ArgumentException - - - - Applies the given function to two collections simultaneously. The - collections must have identical size. The integer passed to the - function indicates the index of element. - - The function to apply to a pair of elements from the input lists along with their index. - The first input list. - The second input list. - - - - let inputs1 = [ "a"; "b"; "c" ] - let inputs2 = [ "banana"; "pear"; "apple" ] - - (inputs1, inputs2) ||> List.iteri2 (fun i s1 s2 -> printfn "Index %d: %s - %s" i s1 s2) - - Evaluates to unit and prints - - Index 0: a - banana - Index 1: b - pear - Index 2: c - apple - - in the console. - - - - Applies the given function to each element of the collection. The integer passed to the - function indicates the index of element. - - The function to apply to the elements of the list along with their index. - The input list. - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.iteri (fun i v -> printfn "{i}: {v}") - - Evaluates to unit and prints - - 0: a - 1: b - 2: c - - in the console. - - - - Applies the given function to two collections simultaneously. The - collections must have identical size. - - The function to apply to pairs of elements from the input lists. - The first input list. - The second input list. - - - - let inputs1 = [ "a"; "b"; "c" ] - let inputs2 = [ 1; 2; 3 ] - - (inputs1, inputs2) ||> List.iter2 (printfn "%s: %i") - - Evaluates to unit and prints - - a: 1 - b: 2 - c: 3 - - in the console. - - - - Applies the given function to each element of the collection. - - The function to apply to elements from the input list. - The input list. - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.iter (printfn "%s") - - Evaluates to unit and prints - - a - b - c - - in the console. - - - - Indexes into the list. The first element has index 0. - - The index to retrieve. - The input list. - - The value at the given index. - - Thrown when the index is negative or the input list does not contain enough elements. - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.item 1 - - Evaluates to "b" - - - - - let inputs = [ "a"; "b"; "c" ] - - inputs |> List.item 4 - - Throws ArgumentException - - - - Returns true if the list contains no elements, false otherwise. - - The input list. - - True if the list is empty. - - - - [ ] |> List.isEmpty - - Evaluates to true - - - - - [ "pear"; "banana" ] |> List.isEmpty - - Evaluates to false - - - - Creates a list by calling the given generator on each index. - - The length of the list to generate. - The function to generate an element from an index. - - Thrown when the input length is negative. - - The list of generated elements. - - - - List.init 4 (fun v -> v + 5) - - Evaluates to [5; 6; 7; 8] - - - - - List.init -5 (fun v -> v + 5) - - Throws ArgumentException - - - - Returns a new list whose elements are the corresponding elements - of the input list paired with the index (from 0) of each element. - - The input list. - - The list of indexed elements. - - - - let inputs = ["a"; "b"; "c"] - - inputs |> List.indexed - - Evaluates to [(0, "a"); (1, "b"); (2, "c")] - - - - Returns the first element of the list. - - The input list. - - Thrown when the list is empty. - - The first element of the list. - - - - let inputs = ["banana"; "pear"] - - inputs |> List.head - - Evaluates to banana - - - - - [] |> List.head - - Throws ArgumentException - - - - Applies a key-generating function to each element of a list and yields a list of - unique keys. Each unique key contains a list of all elements that match - to this key. - - A function that transforms an element of the list into a comparable key. - The input list. - - The result list. - - - - let inputs = [1; 2; 3; 4; 5] - - inputs |> List.groupBy (fun n -> n % 2) - - Evaluates to [(1, [1; 3; 5]); (0, [2; 4])] - - - - Tests 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 exception is raised. - Otherwise, true is returned. - The function to test the input elements. - The first input list. - The second input list. - - Thrown when the input lists differ in length. - - True if all of the pairs of elements satisfy the predicate. - - - - let inputs1 = [1; 2; 3] - let inputs2 = [1; 2; 3] - - (inputs1, inputs2) ||> List.forall2 (=) - - Evaluates to true. - - - - - let items1 = [2017; 1; 1] - let items2 = [2019; 19; 8] - - (items1, items2) ||> List.forall2 (=) - - Evaluates to false. - - - - - let items1 = [1; 2; 3] - let items2 = [1; 2] - - (items1, items2) ||> List.forall2 (=) - - Throws ArgumentException. - - - - Tests 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. - The function to test the input elements. - The input list. - - True if all of the elements satisfy the predicate. - - - - let isEven a = a % 2 = 0 - - [2; 42] |> List.forall isEven // evaluates to true - - [1; 2] |> List.forall isEven // evaluates to false - - - - - Applies 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)). - - The function to update the state given the input elements. - The first input list. - The second input list. - The initial state. - - The final state value. - - - Count the positives, negatives and accumulate some text from back to front: - type Count = - { Positive: int - Negative: int - Text: string } - - let inputs1 = [ -1; -2; -3 ] - let inputs2 = [ 3; 2; 1 ] - let initialState = {Positive = 0; Negative = 0; Text = ""} - - (inputs1, inputs2, initialState) |||> List.foldBack2 (fun a b acc -> - let text = acc.Text + "(" + string a + "," + string b + ") " - if a + b >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text } - ) - - Evaluates to - - { Positive = 2 - Negative = 1 - Text = "(-3,1) (-2,2) (-1,3) " } - - Note acc is a commonly used abbreviation for "accumulator". - - - - Applies a function to each element of the collection, starting from the end, 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)). - - The function to update the state given the input elements. - The input list. - The initial state. - - The state object after the folding function is applied to each element of the list. - - Making the sum of squares for the first 5 natural numbers - - ([1..5], 0) ||> List.foldBack (fun v acc -> acc + v * v) // evaluates 55 - - Note acc is a commonly used abbreviation for "accumulator". - - - Shopping for fruits hungry, you tend to take more of each as the hunger grows - - type Fruit = Apple | Pear | Orange - - type BagItem = { fruit: Fruit; quantity: int } - - let takeMore fruit (previous: BagItem list) = - let toTakeThisTime = - match previous with - | bagItem :: otherBagItems -> bagItem.quantity + 1 - | [] -> 1 - { fruit = fruit; quantity = toTakeThisTime } :: previous - - let input = [ Apple; Pear; Orange ] - - (input, []) ||> List.foldBack takeMore - - Evaluates to - - [{ fruit = Apple; quantity = 3 } - { fruit = Pear; quantity = 2 } - { fruit = Orange; quantity = 1 }] - - - - - Applies 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. - - The function to update the state given the input elements. - The initial state. - The first input list. - The second input list. - - The final state value. - - - Count the number of times the coins match: - type CoinToss = Head | Tails - - let inputs1 = [Tails; Head; Tails] - let inputs2 = [Tails; Head; Head] - - (0, inputs1, inputs2) |||> List.fold2 (fun acc input1 input2 -> - match (input1, input2) with - | Head, Head -> acc + 1 - | Tails, Tails -> acc + 1 - | _ -> acc) - - Evaluates to 1. Note acc is a commonly used abbreviation for "accumulator". - - - - Applies 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. - - The function to update the state given the input elements. - The initial state. - The input list. - - The final state value. - - Making the sum of squares for the first 5 natural numbers - - (0, [1..5]) ||> List.fold (fun s v -> s + v * v) // evaluates 55 - - - - Shopping for fruits hungry, you tend to take more of each as the hunger grows - - type Fruit = Apple | Pear | Orange - - type BagItem = { fruit: Fruit; quantity: int } - - let takeMore (previous: BagItem list) fruit = - let toTakeThisTime = - match previous with - | bagItem :: otherBagItems -> bagItem.quantity + 1 - | [] -> 1 - { fruit = fruit; quantity = toTakeThisTime } :: previous - - let inputs = [ Apple; Pear; Orange ] - - ([], inputs) ||> List.fold takeMore - - Evaluates to - - [{ fruit = Orange; quantity = 3 } - { fruit = Pear; quantity = 2 } - { fruit = Apple; quantity = 1 }] - - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns "true" - - The function to test the input elements. - The input list. - - A list containing only the elements that satisfy the predicate. - - - - let input = [1, "Luke"; 2, "Kirk"; 3, "Kenobi"; 4, "Spock"] - - let isEven x = 0 = x % 2 - - let isComingFromStarTrek (x,_) = isEven x - - input |> List.filter isComingFromStarTrek - - Evaluates to [(2, "Kirk"); (4, "Spock")] - - - - Returns the index of the last element in the list - that satisfies the given predicate. - Raises KeyNotFoundException if no such element exists. - - The function to test the input elements. - The input list. - - Thrown if the predicate evaluates to false for all the - elements of the list. - - The index of the last element that satisfies the predicate. - - - - let isEven x = 0 = x % 2 - - let isGreaterThan x y = y > x - - let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"] - - input |> List.findIndexBack (fun (x,_) -> isEven x) // evaluates 3 - input |> List.findIndexBack (fun (x,_) -> x |> isGreaterThan 6) // raises an exception - - - - - Returns the index of the first element in the list - that satisfies the given predicate. - Raises KeyNotFoundException if no such element exists. - - The function to test the input elements. - The input list. - - Thrown if the predicate evaluates to false for all the - elements of the list. - - The index of the first element that satisfies the predicate. - - - - let isEven x = 0 = x % 2 - - let isGreaterThan x y = y > x - - let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"] - - input |> List.findIndex (fun (x,_) -> isEven x) // evaluates 1 - input |> List.findIndex (fun (x,_) -> x |> isGreaterThan 6) // raises an exception - - - - - Returns the last element for which the given function returns True. - Raises KeyNotFoundException if no such element exists. - - The function to test the input elements. - The input list. - - Thrown if the predicate evaluates to false for - all the elements of the list. - - The last element that satisfies the predicate. - - - - let isEven x = 0 = x % 2 - - let isGreaterThan x y = y > x - - let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"] - - input |> List.findBack (fun (x,_) -> isEven x) // evaluates (4, "Kenobi") - input |> List.findBack (fun (x,_) -> x |> isGreaterThan 6) // raises an exception - - - - - Returns the first element for which the given function returns True. - Raises KeyNotFoundException if no such element exists. - - The function to test the input elements. - The input list. - - Thrown if the predicate evaluates to false for - all the elements of the list. - - The first element that satisfies the predicate. - - - - let isEven x = 0 = x % 2 - - let isGreaterThan x y = y > x - - let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"] - - input |> List.find (fun (x,_) -> isEven x) // evaluates (2, "Kirk") - input |> List.find (fun (x,_) -> x |> isGreaterThan 6) // raises an exception - - - - - Tests 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 exception is raised. - Otherwise, false is returned. - - The function to test the input elements. - The first input list. - The second input list. - - Thrown when the input lists differ in length. - - True if any pair of elements satisfy the predicate. - - Check if the sum of pairs (from 2 different lists) have at least one even number - - let anEvenSum a b = 0 = (a + b) % 2 - - ([1..4], [2..5]) - ||> List.exists2 anEvenSum // evaluates false - - ([1..4], [2;4;5;6]) - ||> List.exists2 anEvenSum // evaluates true - - - - - Tests 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. - The function to test the input elements. - The input list. - - True if any element satisfies the predicate. - - - - let input = [1, "Kirk"; 2, "Spock"; 3, "Kenobi"] - - input |> List.exists (fun x -> x = (3, "Kenobi")) // evaluates true - - input |> List.exists (fun (n, name) -> n > 5) // evaluates false - - - - - Returns the only element of the list or None if it is empty or contains more than one element. - - The input list. - - The only element of the list or None. - - - - [1] |> List.tryExactlyOne // evaluates Some 1 - [1;2] |> List.tryExactlyOne // evaluates None - ([] : int list) |> List.tryExactlyOne // evaluates None - - - - - Returns the only element of the list. - - The input list. - - The only element of the list. - - Thrown when the input does not have precisely one element. - - - - ["the chosen one"] |> List.exactlyOne // evaluates "the chosen one" - - - - - - let input : string list = [] - - input |> List.exactlyOne - - Will throw the exception: System.ArgumentException: The input sequence was empty - - - - - [1..5] |> List.exactlyOne - - Will throw the exception: System.ArgumentException: The input sequence contains more than one element - - - - Returns a new list with the distinct elements of the input list which do not appear in the itemsToExclude sequence, - using generic hash and equality comparisons to compare values. - - A sequence whose elements that also occur in the input list will cause those elements to be - removed from the result. - A list whose elements that are not also in itemsToExclude will be returned. - - A list that contains the distinct elements of list that do not appear in itemsToExclude. - - Thrown when itemsToExclude is null. - - - - let input = [1, "Kirk"; 2, "Spock"; 3, "Kenobi"] - - input |> List.except [3, "Kenobi"] - - Evaluates to [(1, "Kirk"); (2, "Spock")]. - - - - - [0..10] |> List.except [1..5] // evaluates [0; 6; 7; 8; 9; 10] - - - - - - [1..5] |> List.except [0..10] // evaluates [] - - - - - Returns an empty list of the given type. - - - Splits the input list into at most count chunks. - - The maximum number of chunks. - The input list. - - The list split into chunks. - - Thrown when count is not positive. - - - - [1..10] |> List.splitInto 2 - - Evaluates to [[1; 2; 3; 4; 5]; [6; 7; 8; 9; 10]]. - - - - - [1..10] |> List.splitInto 4 - - Evaluates to [[1; 2; 3]; [4; 5; 6]; [7; 8]; [9; 10]]. - - - - Applies a key-generating function to each element of a list and returns a list yielding unique - keys and their number of occurrences in the original list. - - A function transforming each item of the input list into a key to be - compared against the others. - The input list. - - The result list. - - Counting the number of occurrences of chars - - let input = ['H'; 'a'; 'p'; 'p'; 'y'] - - input |> List.countBy id - - Evaluates [('H', 1); ('a', 1); ('p', 2); ('y', 1)] - - - - Returns a list 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 list then the later occurrences are discarded. - - A function transforming the list items into comparable keys. - The input list. - - The result list. - - - - let isEven x = 0 = x % 2 - - let input = [6;1;2;3;1;4;5;5] - - input |> List.distinctBy isEven // evaluates [6; 1] - - - - - Returns a list that contains no duplicate entries according to generic hash and - equality comparisons on the entries. - If an element occurs multiple times in the list then the later occurrences are discarded. - - The input list. - - The result list. - - - - let input = [6;1;2;3;1;4;5;5] - - input |> List.distinct - - Evaluates to [6; 1; 2; 3; 4; 5]. - - - - Tests if the list contains the specified element. - - The value to locate in the input list. - The input list. - - True if the input list contains the specified element; false otherwise. - - - - [1..9] |> List.contains 0 - - Evaluates to false. - - - - - [1..9] |> List.contains 3 - - Evaluates to true. - - - - - let input = [1, "SpongeBob"; 2, "Patrick"; 3, "Squidward"; 4, "Mr. Krabs"] - - input |> List.contains (2, "Patrick") - - Evaluates to true. - - - - - let input = [1, "SpongeBob"; 2, "Patrick"; 3, "Squidward"; 4, "Mr. Krabs"] - - input |> List.contains (22, "Patrick") - - Evaluates to false. - - - - Returns a new list that contains the elements of each the lists in order. - - The input sequence of lists. - - The resulting concatenated list. - - - - let input = [ [1;2] - [3;4;5] - [6;7;8;9] ] - input |> List.concat // evaluates [1; 2; 3; 4; 5; 6; 7; 8; 9] - - - - - Compares two lists using the given comparison function, element by element. - - A function that takes an element from each list and returns an int. - If it evaluates to a non-zero value iteration is stopped and that value is returned. - The first input list. - The second input list. - - Returns the first non-zero result from the comparison function. If the first list has a - larger element, the return value is always positive. If the second list has a larger - element, the return value is always negative. When the elements are equal in the two - lists, 1 is returned if the first list is longer, 0 is returned if they are equal in - length, and -1 is returned when the second list is longer. - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 10] - let input2 = [1; 10] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to 0 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 5] - let input2 = [1; 8] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to -1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 11] - let input2 = [1; 13] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1; 2] - let input2 = [1] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [1] - let input2 = [1; 2] - - (input1, input2) ||> List.compareWith closerToNextDozen - - Evaluates to -1 - - - - For each element of the list, applies the given function. Concatenates all the results and return the combined list. - - The function to transform each input element into a sublist to be concatenated. - The input list. - - The concatenation of the transformed sublists. - - For each positive number in the array we are generating all the previous positive numbers - - [1..4] |> List.collect (fun x -> [1..x]) - - The sample evaluates to [1; 1; 2; 1; 2; 3; 1; 2; 3; 4] (added extra spaces for easy reading) - - - - Divides the input list into lists (chunks) with at a positive number of at most chunkSize elements. - Returns a new list containing the generated lists (chunks) as its elements. - - Returns an empty list when the input list is empty. - - The maximum size of each chunk. - The input list. - - The list divided into chunks. - - Thrown when chunkSize is not positive. - - - - [ 1..10 ] |> List.chunkBySize 3 - - Evaluates to - - [ [ 1; 2; 3 ] - [ 4; 5; 6 ] - [ 7; 8; 9 ] - [ 10 ] ] - - - - - - [ 1..5 ] |> List.chunkBySize 10 - - Evaluates to - - [ [ 1; 2; 3; 4; 5 ] ] - - - - - Applies a function to each element in a list and then returns - a list of values v where the applied function returned Some(v). - - Returns an empty list when the input list is empty or when the applied chooser function - returns None for all elements. - - - The function to be applied to the list elements. - The input list. - - The resulting list comprising the values v where the chooser function returned Some(x). - - - Using the identity function id (is defined like fun x -> x): - - - let input1 = [ Some 1; None; Some 3; None ] - - input1 |> List.choose id - - Evaluates to - - [ 1; 3 ] - - - - - - type Happiness = - | AlwaysHappy - | MostOfTheTimeGrumpy - - type People = { Name: string; Happiness: Happiness } - - let takeJustHappyPersons person = - match person.Happiness with - | AlwaysHappy -> Some person.Name - | MostOfTheTimeGrumpy -> None - - let candidatesForTheTrip = - [ { Name = "SpongeBob" - Happiness = AlwaysHappy } - { Name = "Patrick" - Happiness = AlwaysHappy } - { Name = "Squidward" - Happiness = MostOfTheTimeGrumpy } ] - - candidatesForTheTrip - |> List.choose takeJustHappyPersons - - Evaluates to - - [ "SpongeBob"; "Patrick" ] - - - - - - let input3: int option list = [] - - input3 |> List.choose id - Evaluates to: - empty list - - - - - - let input4: string option list = [None; None] - - input4 |> List.choose id - Evaluates to - empty list - - - - - Using the identity function id (is defined like fun x -> x): - - - let input5 = [ Some 1; None; Some 3; None ] - - input5 |> List.choose id // evaluates [1; 3] - - - - - - Returns the average of values in a list generated by applying a function to each element of the list. - - The function to transform the list elements into the values to be averaged. - The input list. - - Thrown when the list is empty. - - The resulting average. - - Calculate average age of persons by extracting their age from a record type. - - type People = { Name: string; Age: int } - - let getAgeAsFloat person = float person.Age - - let people = - [ { Name = "Kirk"; Age = 26 } - { Name = "Spock"; Age = 90 } - { Name = "McCoy"; Age = 37 } ] - - people |> List.averageBy getAgeAsFloat - - Evaluates to - - 51.0 - - - - - Returns the average of the values in a non-empty list. - - The input list. - - Thrown when the input list is empty. - - The resulting average. - - - - [1.0 .. 9.0] |> List.average - - Evaluates to - - 5.0 - - - - - Returns a new list that contains the elements of the first list - followed by elements of the second list. - - The first input list. - The second input list. - - The resulting list. - - - - List.append [ 1..3 ] [ 4..7 ] - - [ 4..7 ] |> List.append [ 1..3 ] - - Evaluates to - - [ 1; 2; 3; 4; 5; 6; 7 ] - - - - - Returns a new list that contains all pairings of elements from two lists. - - The first input list. - The second input list. - - The resulting list of pairs. - - - - let people = [ "Kirk"; "Spock"; "McCoy" ] - let numbers = [ 1; 2 ] - - people |> List.allPairs numbers - - Evaluates to - - [ (1, "Kirk"); (1, "Spock"); (1, "McCoy"); (2, "Kirk"); (2, "Spock"); (2, "McCoy") ] - - - - - Contains operations for working with values of type . - - Operations for collections such as lists, arrays, sets, maps and sequences. See also - F# Collection Types in the F# Language Guide. - - - - Return a new array with new items inserted before the given index. - - The index where the items should be inserted. - The values to insert. - The input array. - - The result array. - - Thrown when index is below 0 or greater than source.Length. - - - - let inputs = [| 0; 1; 2 |] - - inputs |> Array.insertManyAt 1 [8; 9] - - Evaluates to [| 0; 8; 9; 1; 2 |]. - - - - Return a new array with a new item inserted before the given index. - - The index where the item should be inserted. - The value to insert. - The input array. - - The result array. - - Thrown when index is below 0 or greater than source.Length. - - - - let inputs = [| 0; 1; 2 |] - - inputs |> Array.insertAt 1 9 - - Evaluates to [| 0; 9; 1; 2 |]. - - - - Return a new array with the item at a given index set to the new value. - - The index of the item to be replaced. - The new value. - The input array. - - The result array. - - Thrown when index is outside 0..source.Length - 1 - - - - let inputs = [| 0; 1; 2 |] - - inputs |> Array.updateAt 1 9 - - Evaluates to [| 0; 9; 2 |]. - - - - Return a new array with the number of items starting at a given index removed. - - The index of the item to be removed. - The number of items to remove. - The input array. - - The result array. - - Thrown when index is outside 0..source.Length - count - - - - let inputs = [| 0; 1; 2; 3 |] - - inputs |> Array.removeManyAt 1 2 - - Evaluates to [| 0; 3 |]. - - - - Return a new array with the item at a given index removed. - - The index of the item to be removed. - The input array. - - The result array. - - Thrown when index is outside 0..source.Length - 1 - - - - let inputs = [| 0; 1; 2 |] - - inputs |> Array.removeAt 1 - - Evaluates to [| 0; 2 |]. - - - - Combines three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException is - raised. - - The first input array. - The second input array. - The third input array. - - Thrown when any of the input arrays are null. - Thrown when the input arrays differ in length. - - The array of tupled elements. - - - - let numbers = [| 1; 2 |] - let names = [| "one"; "two" |] - let roman = [| "I"; "II" |] - - Array.zip3 numbers names roman - - Evaluates to [|(1, "one", "I"); (2, "two", "II")|]. - - - - Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - raised. - - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The array of tupled elements. - - - - let numbers = [|1; 2|] - let names = [|"one"; "two"|] - - Array.zip numbers names - - Evaluates to [| (1, "one"); (2, "two") |]. - - - - Returns an array of sliding windows containing elements drawn from the input - array. Each window is returned as a fresh array. - - The number of elements in each window. - The input array. - - The result array. - - Thrown when the input array is null. - Thrown when windowSize is not positive. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.windowed 3 - - Evaluates to [|[|1; 2; 3|]; [|2; 3; 4|]; [|3; 4; 5|]|] - - - - Returns a new array containing only the elements of the array - for which the given predicate returns "true". - - The function to test the input elements. - The input array. - - An array containing the elements for which the given predicate returns true. - - Thrown when the input array is null. - - This is identical to Array.filter. - - Select only the even numbers: - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.where (fun elm -> elm % 2 = 0) - - Evaluates to [| 2; 4 |] - - - - Splits an array of triples into three arrays. - - The input array. - - The tuple of three arrays. - - Thrown when the input array is null. - - - - let inputs = [| (1, "one", "I"); (2, "two", "II") |] - - let numbers, names, roman = inputs |> Array.unzip3 - - Evaluates numbers to [|1; 2|], names to [|"one"; "two"|] and roman to [|"I"; "II"|]. - - - - Splits an array of pairs into two arrays. - - The input array. - - The two arrays. - - Thrown when the input array is null. - - - - let inputs = [| (1, "one"); (2, "two") |] - - let numbers, names = inputs |> Array.unzip - - Evaluates numbers to [|1; 2|] and names to [|"one"; "two"|]. - - - - Returns an array that contains the elements generated by the given computation. - The generator is repeatedly called to build the list until it returns `None`. - The given initial state argument is passed to the element generator. - - A function that takes in the current state and returns an option tuple of the next - element of the array and the next state value. - The initial state value. - - The result array. - - - - 1 |> Array.unfold (fun state -> if state > 100 then None else Some (state, state * 2)) - - Evaluates to [| 1; 2; 4; 8; 16; 32; 64 |] - - - - Returns the index of the last element in the array - that satisfies the given predicate. - - The function to test the input elements. - The input array. - - Thrown when the input array is null. - - The index of the last element that satisfies the predicate, or None. - - Try to find the index of the first even number from the back: - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 3 - - - Try to find the index of the first even number from the back: - - let inputs = [| 1; 3; 5; 7 |] - - inputs |> Array.tryFindIndexBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Tries to find the nth element in the array. - Returns None if index is negative or the input array does not contain enough elements. - - The index of element to retrieve. - The input array. - - The nth element of the array or None. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.tryItem 1 - - Evaluates to Some "b". - - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.tryItem 4 - - Evaluates to None. - - - - Returns the index of the first element in the array - that satisfies the given predicate. - - The function to test the input elements. - The input array. - - Thrown when the input array is null. - - The index of the first element that satisfies the predicate, or None. - - Try to find the index of the first even number: - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to Some 1 - - - Try to find the index of the first even number: - - let inputs = [| 1; 3; 5; 7 |] - - inputs |> Array.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the last element for which the given function returns True. - Return None if no such element exists. - - The function to test the input elements. - The input array. - - Thrown when the input array is null. - - The last element that satisfies the predicate, or None. - - Try to find the first even number from the back: - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to Some 4 - - - Try to find the first even number from the back: - - let inputs = [| 1; 5; 3 |] - - inputs |> Array.tryFindBack (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the first element for which the given function returns True. - Return None if no such element exists. - - The function to test the input elements. - The input array. - - The first element that satisfies the predicate, or None. - - Thrown when the input array is null. - - Try to find the first even number: - - let inputs = [| 1; 2; 3 |] - - inputs |> Array.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to Some 2 - - - Try to find the first even number: - - let inputs = [| 1; 5; 3 |] - - inputs |> Array.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns at most N elements in a new array. - - The maximum number of items to return. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.truncate 2 - - Evaluates to [| "a"; "b" |] - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.truncate 6 - - Evaluates to [| "a"; "b"; "c"; "d" |] - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.truncate 0 - - Evaluates to [| |]. - - - - Returns the transpose of the given sequence of arrays. - - The input sequence of arrays. - - The transposed array. - - Thrown when the input sequence is null. - Thrown when the input arrays differ in length. - - - - let inputs = - [| [| 10; 20; 30 |] - [| 11; 21; 31 |] |] - - inputs |> Array.transpose - - Evaluates to [|[|10; 11|]; [|20; 21|]; [|30; 31|]|]. - - - - Views the given array as a sequence. - - The input array. - - The sequence of array elements. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 5 |] - - inputs |> Array.toSeq - - Evaluates to seq { 1; 2; 5 }. - - - - Builds a list from the given array. - - The input array. - - The list of array elements. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 5 |] - - inputs |> Array.toList - - Evaluates to [ 1; 2; 5 ]. - - - - Returns a new array containing the elements of the original except the first element. - - The input array. - - Thrown when the array is empty. - Thrown when the input array is null. - - A new array containing the elements of the original except the first element. - - - - let inputs = [| "a"; "bb"; "ccc" |] - - inputs |> Array.tail - - Evaluates to [| "bb"; "ccc" |] - - - - - Returns an array that contains all elements of the original array while the - given predicate returns True, and then returns no further elements. - - A function that evaluates to false when no more items should be returned. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "bb"; "ccc"; "d" |] - - inputs |> Array.takeWhile (fun x -> x.Length < 3) - - Evaluates to [| "a"; "bb" |] - - - - - Returns the first N elements of the array. - Throws InvalidOperationException - if the count exceeds the number of elements in the array. Array.truncate - returns as many items as the array contains instead of throwing an exception. - - The number of items to take. - The input array. - - The result array. - - Thrown when the input array is null. - Thrown when the input array is empty. - Thrown when count exceeds the number of elements - in the list. - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.take 2 - - Evaluates to [| "a"; "b" |] - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.take 6 - - Throws InvalidOperationException. - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.take 0 - - Evaluates to [| |]. - - - - Returns the sum of the results generated by applying the function to each element of the array. - - The function to transform the array elements into the type to be summed. - The input array. - - The resulting sum. - - Thrown when the input array is null. - - - - let input = [| "aa"; "bbb"; "cc" |] - - input |> Array.sumBy (fun s -> s.Length) - - Evaluates to 7. - - - - Returns the sum of the elements in the array. - - The input array. - - The resulting sum. - - Thrown when the input array is null. - - - - let input = [| 1; 5; 3; 2 |] - - input |> Array.sum - - Evaluates to 11. - - - - Sorts the elements of an array, in descending order, using the given projection for the keys and returning a new array. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - The sorted array. - - - - let input = [| "a"; "bbb"; "cccc"; "dd" |] - - input |> Array.sortByDescending (fun s -> s.Length) - - Evaluates to [|"cccc"; "bbb"; "dd"; "a"|]. - - - - Sorts the elements of an array, in descending order, returning a new array. Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The input array. - - The sorted array. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - input |> Array.sortDescending - - Evaluates to [| 8; 6; 4; 3; 1; 1 |]. - - - - Splits an array into two arrays, at the given index. - - The index at which the array is split. - The input array. - - The two split arrays. - - Thrown when the input array is null. - Thrown when split index exceeds the number of elements - in the array. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - let front, back = input |> Array.splitAt 3 - - Evaluates front to [|8; 4; 3|] and back to [|1; 6; 1|]. - - - - Sorts the elements of an array by mutating the array in-place, using the given comparison function. - Elements are compared using . - - The input array. - - Thrown when the input array is null. - - - - let array = [| 8; 4; 3; 1; 6; 1 |] - - Array.sortInPlace array - - After evaluation array contains [| 1; 1; 3; 4; 6; 8 |]. - - - - Sorts the elements of an array by mutating the array in-place, using the given comparison function as the order. - - The function to compare pairs of array elements. - The input array. - - Thrown when the input array is null. - - The following sorts entries using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let array = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |] - - array |> Array.sortInPlaceWith compareEntries - - After evaluation array contains [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. - - - - Sorts the elements of an array by mutating the array in-place, using the given projection for the keys. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - Thrown when the input array is null. - - - - let array = [| "a"; "bbb"; "cccc"; "dd" |] - - array |> Array.sortInPlaceBy (fun s -> s.Length) - - After evaluation array contains [|"a"; "dd"; "bbb"; "cccc"|]. - - - - Sorts the elements of an array, using the given comparison function as the order, returning a new array. - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to compare pairs of array elements. - The input array. - - The sorted array. - - Thrown when the input array is null. - - Sort an array of pairs using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let input = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |] - - input |> Array.sortWith compareEntries - - Evaluates to [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. - - - - Sorts the elements of an array, using the given projection for the keys and returning a new array. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - The sorted array. - - Thrown when the input array is null. - - - - let input = [| "a"; "bbb"; "cccc"; "dd" |] - - input |> Array.sortBy (fun s -> s.Length) - - Evaluates to [|"a"; "dd"; "bbb"; "cccc"|]. - - - - Sorts the elements of an array, returning a new array. Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The input array. - - The sorted array. - - Thrown when the input array is null. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - Array.sort input - - Evaluates to [| 1; 1; 3; 4; 6; 8 |]. - - - - Builds a new array that contains the given subrange specified by - starting index and length. - - The input array. - The index of the first element of the sub array. - The length of the sub array. - - The created sub array. - - Thrown when the input array is null. - Thrown when either startIndex or count is negative, - or when there aren't enough elements in the input array. - - - Slicing syntax is generally preferred, e.g. - - let input = [| 0; 1; 2; 3; 4; 5 |] - - input.[2..4] - - - - - - let input = [| 0; 1; 2; 3; 4; 5 |] - - Array.sub input 2 3 - - Evaluates to [| 2; 3; 4 |]. - - - - Bypasses elements in an array while the given predicate returns True, and then returns - the remaining elements in a new array. - - A function that evaluates an element of the array to a boolean value. - The input array. - - The created sub array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "bbb"; "cc"; "d" |] - - inputs |> Array.skipWhile (fun x -> x.Length < 3) - - Evaluates to [|"bbb"; "cc"; "d"|] - - - - - Builds a new array that contains the elements of the given array, excluding the first N elements. - - The number of elements to skip. If negative the full array will be returned as a copy. - The input array. - - A copy of the input array, after removing the first N elements. - - Thrown when the input array is null. - Thrown when count exceeds the number of - elements in the array. - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.skip 2 - - Evaluates to [| "c"; "d" |] - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.skip 5 - - Throws ArgumentException. - - - - - let inputs = [| "a"; "b"; "c"; "d" |] - - inputs |> Array.skip -1 - - Evaluates to [| "a"; "b"; "c"; "d" |]. - - - - Sets an element of an array. - - The input array. - The input index. - The input value. - - Thrown when the input array is null. - Thrown when the index is negative or the input array does not contain enough elements. - - - - let inputs = [| "a"; "b"; "c" |] - - Array.set inputs 1 "B" - - After evaluation inputs contains [| "a"; "B"; "c" |] - - - - - let inputs = [| "a"; "b"; "c" |] - - Array.set inputs 4 "d" - - Throws IndexOutOfRangeException - - - - Returns an array that contains one item only. - - The input item. - - The result array of one item. - - - - Array.singleton 7 - - Evaluates to [| 7 |]. - - - - Like foldBack, but return both the intermediary and final results. - - The function to update the state given the input elements. - The input array. - The initial state. - - The array of state values. - - Thrown when the input array is null. - - Apply a list charges from back to front, and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - (inputs, 0) ||> Array.scanBack (fun charge acc -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to [|2; 1; 3; 0|] by processing each input from back to front. Note 0 is the intial - state, 3 the next state, 1 the next state, and 2 the final state. - - - - Like fold, but return the intermediary and final results. - - The function to update the state given the input elements. - The initial state. - The input array. - - The array of state values. - - Thrown when the input array is null. - - Apply a list charges and collect the running balances as each is applied: - - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - (0, inputs) ||> Array.scan (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to [|0; 1; -1; 2|]. Note 0 is the intial - state, 1 the next state, -1 the next state, and 2 the final state. - - - - Returns a new array with the elements in reverse order. - - The input array. - - The reversed array. - - Thrown when the input array is null. - - - - Array.rev [| 0; 1; 2 |] - - Evaluates to [| 2; 1; 0 |]. - - - - Creates an array by replicating the given initial value. - - The number of elements to replicate. - The value to replicate - - The generated array. - - Thrown when count is negative. - - - - Array.replicate 3 "a" - - Evaluates to [| "a"; "a"; "a" |]. - - - - Applies a function to each element of the array, starting from the end, 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)). - - A function that takes in the next-to-last element of the list and the - current accumulated result to produce the next accumulated result. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The final result of the reductions. - - - - let inputs = [| 1; 3; 4; 2 |] - - inputs |> Array.reduceBack (fun a b -> a + b * 10) - - Evaluates to 2431, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10 - - - - Applies a function to each element of the array, threading an accumulator argument - through the computation. If the input function is f and the elements are i0...iN - then computes f (... (f i0 i1)...) iN. - Raises ArgumentException if the array has size zero. - - The function to reduce a pair of elements to a single element. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The final result of the reductions. - - - - let inputs = [| 1; 3; 4; 2 |] - - inputs |> Array.reduce (fun a b -> a * 10 + b) - - Evaluates to 1342, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2 - - - - Returns an array with all elements permuted according to the - specified permutation. - - The function that maps input indices to output indices. - The input array. - - The output array. - - Thrown when the input array is null. - Thrown when indexMap does not produce a valid permutation. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.permute (fun x -> (x + 1) % 4) - - Evaluates to [|4; 1; 2; 3|]. - - - - Splits the collection into two collections, containing the - elements for which the given predicate returns "true" and "false" - respectively. - - The function to test the input elements. - The input array. - - A pair of arrays. The first containing the elements the predicate evaluated to true, - and the second containing those evaluated to false. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.partition (fun x -> x % 2 = 0) - - Evaluates to ([|2; 4|], [|1; 3|]). - - - - Returns an array of each element in the input array and its predecessor, with the - exception of the first element which is only returned as the predecessor of the second element. - - The input array. - - The result array. - - Thrown when the input sequence is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.pairwise - - Evaluates to [|(1, 2); (2, 3); (3, 4)|]. - - - - Builds a new array from the given enumerable object. - - The input sequence. - - The array of elements from the sequence. - - Thrown when the input sequence is null. - - - - let inputs = seq { 1; 2; 5 } - - inputs |> Array.ofSeq - - Evaluates to [| 1; 2; 5 |]. - - - - Builds an array from the given list. - - The input list. - - The array of elements from the list. - - - - let inputs = [ 1; 2; 5 ] - - inputs |> Array.ofList - - Evaluates to [| 1; 2; 5 |]. - - - - Returns the lowest of all elements of the array, compared via Operators.min on the function result. - - Throws ArgumentException for empty arrays. - - The function to transform the elements into a type supporting comparison. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The minimum element. - - - - let inputs = [| "aaa"; "b"; "cccc" |] - - inputs |> Array.minBy (fun s -> s.Length) - - Evaluates to "b" - - - - - let inputs: string[]= [| |] - - inputs |> Array.minBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the lowest of all elements of the array, compared via Operators.min. - - Throws ArgumentException for empty arrays - - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The minimum element. - - - - let inputs = [| 10; 12; 11 |] - - inputs |> Array.min - - Evaluates to 10 - - - - - let inputs: int[]= [| |] - - inputs |> Array.min - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the array, compared via Operators.max on the function result. - - Throws ArgumentException for empty arrays. - - The function to transform the elements into a type supporting comparison. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The maximum element. - - - - let inputs = [| "aaa"; "b"; "cccc" |] - - inputs |> Array.maxBy (fun s -> s.Length) - - Evaluates to "cccc" - - - - - let inputs: string[]= [| |] - - inputs |> Array.maxBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the array, compared via Operators.max on the function result. - - Throws ArgumentException for empty arrays. - - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The maximum element. - - - - let inputs = [| 10; 12; 11 |] - - inputs |> Array.max - - Evaluates to 12 - - - - - let inputs: int[]= [| |] - - inputs |> Array.max - - Throws System.ArgumentException. - - - - Builds a new array whose elements are the results of applying the given function - to each of the elements of the array. The integer index passed to the - function indicates the index of element being transformed, starting at zero. - - The function to transform elements and their indices. - The input array. - - The array of transformed elements. - - Thrown when the input array is null. - - - - let inputs = [| 10; 10; 10 |] - - inputs |> Array.mapi (fun i x -> i + x) - - Evaluates to [| 10; 11; 12 |] - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise, also passing the index of - the elements. The two input arrays must have the same lengths, otherwise an ArgumentException is - raised. - - The function to transform pairs of input elements and their indices. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The array of transformed elements. - - - - let inputs1 = [| "a"; "bad"; "good" |] - let inputs2 = [| 0; 2; 1 |] - - (inputs1, inputs2) ||> Array.mapi2 (fun i x y -> i, x[y]) - - Evaluates to [|(0, 'a'); (1, 'd'); (2, 'o')|] - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding triples from the three collections. The three input - arrays must have the same length, otherwise an ArgumentException is - raised. - - The function to transform the pairs of the input elements. - The first input array. - The second input array. - The third input array. - - Thrown when the input arrays differ in length. - Thrown when any of the input arrays is null. - - The array of transformed elements. - - - - let inputs1 = [| "a"; "t"; "ti" |] - let inputs2 = [| "l"; "h"; "m" |] - let inputs3 = [| "l"; "e"; "e" |] - - (inputs1, inputs2, inputs3) |||> Array.map3 (fun x y z -> x + y + z) - - Evaluates to [| "all"; "the"; "time" |] - - - - - Combines map and foldBack. Builds a new array whose elements are the results of applying the given function - to each of the elements of the input array. The function is also used to accumulate a final value. - - The function to transform elements from the input array and accumulate the final value. - The input array. - The initial state. - - Thrown when the input array is null. - - The array of transformed elements, and the final accumulated value. - - Accumulate the charges from back to front, and double them as well - - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - let newCharges, balance = - (inputs, 0) ||> Array.mapFoldBack (fun charge acc -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to [|In 2; Out 4; In 6|] and balance to 2. - - - - Combines map and fold. Builds a new array whose elements are the results of applying the given function - to each of the elements of the input array. The function is also used to accumulate a final value. - - The function to transform elements from the input array and accumulate the final value. - The initial state. - The input array. - - Thrown when the input array is null. - - The array of transformed elements, and the final accumulated value. - - - Accumulate the charges, and double them as well - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - let newCharges, balance = - (0, inputs) ||> Array.mapFold (fun acc charge -> - match charge with - | In i -> In (i*2), acc + i - | Out o -> Out (o*2), acc - o) - - Evaluates newCharges to [|In 2; Out 4; In 6|] and balance to 2. - - - - Builds a new collection whose elements are the results of applying the given function - to the corresponding elements of the two collections pairwise. The two input - arrays must have the same lengths, otherwise an ArgumentException is - raised. - - The function to transform the pairs of the input elements. - The first input array. - The second input array. - - Thrown when the input arrays differ in length. - Thrown when either of the input arrays is null. - - The array of transformed elements. - - - - let inputs1 = [| "a"; "bad"; "good" |] - let inputs2 = [| 0; 2; 1 |] - - (inputs1, inputs2) ||> Array.map2 (fun x y -> x[y]) - - Evaluates to [| 'a'; 'd'; 'o' |] - - - - Builds a new array whose elements are the results of applying the given function - to each of the elements of the array. - - The function to transform elements of the array. - The input array. - - The array of transformed elements. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "bbb"; "cc" |] - - inputs |> Array.map (fun x -> x.Length) - - Evaluates to [| 1; 3; 2 |] - - - - Returns the last element of the array. - Return None if no such element exists. - - The input array. - - The last element of the array or None. - - Thrown when the input sequence is null. - - - - [| "pear"; "banana" |] |> Array.tryLast - - Evaluates to Some "banana" - - - - - [| |] |> Array.tryLast - - Evaluates to None - - - - Returns the length of an array. You can also use property arr.Length. - - The input array. - - The length of the array. - - The notation array.Length is preferred. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.length - - Evaluates to 3 - - - - Gets an element from an array. - - The input index. - The input array. - - The value of the array at the given index. - - Normally the syntax array[index] is preferred. - - Thrown when the input array is null. - Thrown when the index is negative or the input array does not contain enough elements. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.item 1 - - Evaluates to "b" - - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.item 4 - - Throws ArgumentException - - - - Returns the last element of the array. - - The input array. - - The last element of the array. - - Thrown when the input array is null. - Thrown when the input does not have any elements. - - - - [| "pear"; "banana" |] |> Array.last - - Evaluates to banana - - - - - [| |] |> Array.last - - Throws ArgumentException - - - - Applies the given function to pair of elements drawn from matching indices in two arrays, - also passing the index of the elements. The two arrays must have the same lengths, - otherwise an ArgumentException is raised. - - The function to apply to each index and pair of elements. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - - - let inputs1 = [| "a"; "b"; "c" |] - let inputs2 = [| "banana"; "pear"; "apple" |] - - (inputs1, inputs2) ||> Array.iteri2 (fun i s1 s2 -> printfn "Index {i}: {s1} - {s2}") - - Evaluates to unit and prints - - Index 0: a - banana - Index 1: b - pear - Index 2: c - apple - - in the console. - - - - Applies the given function to each element of the array. The integer passed to the - function indicates the index of element. - - The function to apply to each index and element. - The input array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.iteri (fun i v -> printfn "{i}: {v}") - - Evaluates to unit and prints - - 0: a - 1: b - 2: c - - in the console. - - - - Applies the given function to pair of elements drawn from matching indices in two arrays. The - two arrays must have the same lengths, otherwise an ArgumentException is - raised. - - The function to apply. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - - - let inputs1 = [| "a"; "b"; "c" |] - let inputs2 = [| 1; 2; 3 |] - - (inputs1, inputs2) ||> Array.iter2 (printfn "%s: %i") - - Evaluates to unit and prints - - a: 1 - b: 2 - c: 3 - - in the console. - - - - Applies the given function to each element of the array. - - The function to apply. - The input array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.iter (printfn "%s") - - Evaluates to unit and prints - - a - b - c - - in the console. - - - - Returns true if the given array is empty, otherwise false. - - The input array. - - True if the array is empty. - - Thrown when the input array is null. - - - - [| |] |> Array.isEmpty - - Evaluates to true - - - - - [| "pear"; "banana" |] |> Array.isEmpty - - Evaluates to false - - - - Creates an array where the entries are initially the default value Unchecked.defaultof<'T>. - - The length of the array to create. - - The created array. - - Thrown when count is negative. - - - - let arr : int[] = Array.zeroCreate 4 - - Evaluates to [| 0; 0; 0; 0 |] - - - - Creates an array given the dimension and a generator function to compute the elements. - - The number of elements to initialize. - The function to generate the initial values for each index. - - The created array. - - Thrown when count is negative. - - - - Array.init 4 (fun v -> v + 5) - - Evaluates to [| 5; 6; 7; 8 |] - - - - - Array.init -5 (fun v -> v + 5) - - Throws ArgumentException - - - - Builds a new array whose elements are the corresponding elements of the input array - paired with the integer index (from 0) of each element. - - The input array. - - The array of indexed elements. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.indexed - - Evaluates to [| (0, "a"); (1, "b"); (2, "c") |] - - - - Applies a key-generating function to each element of an array and yields an array of - unique keys. Each unique key contains an array of all elements that match - to this key. - - A function that transforms an element of the array into a comparable key. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.groupBy (fun n -> n % 2) - - Evaluates to [| (1, [| 1; 3; 5 |]); (0, [| 2; 4 |]) |] - - - - Returns the first element of the array. - - The input array. - - The first element of the array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - - - let inputs = [| "banana"; "pear" |] - - inputs |> Array.head - - Evaluates to banana - - - - - [| |] |> Array.head - - Throws ArgumentException - - - - Gets an element from an array. - - The input array. - The input index. - - Normally the syntax array[index] is preferred. - - The value of the array at the given index. - - Thrown when the input array is null. - Thrown when the index is negative or the input array does not contain enough elements. - - - - let inputs = [| "a"; "b"; "c" |] - - Array.get inputs 1 - - Evaluates to "b" - - - - - let inputs = [| "a"; "b"; "c" |] - - Array.get inputs 4 - - Throws IndexOutOfRangeException - - - - 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. - - The function to update the state given the input elements. - The first input array. - The second input array. - The initial state. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The final state. - - - Count the positives, negatives and accumulate some text from back to front: - type Count = - { Positive: int - Negative: int - Text: string } - - let inputs1 = [| -1; -2; -3 |] - let inputs2 = [| 3; 2; 1 |] - let initialState = {Positive = 0; Negative = 0; Text = ""} - - (inputs1, inputs2, initialState) |||> Array.foldBack2 (fun a b acc -> - let text = acc.Text + "(" + string a + "," + string b + ") " - if a + b >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text } - ) - - Evaluates to - - { Positive = 2 - Negative = 1 - Text = "(-3,1) (-2,2) (-1,3) " } - - - - - Applies a function to pairs of elements drawn from the two collections, - left-to-right, threading an accumulator argument - through the computation. The two input - arrays must have the same lengths, otherwise an ArgumentException is - raised. - - The function to update the state given the input elements. - The initial state. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The final state. - - - - type CoinToss = Head | Tails - - let data1 = [| Tails; Head; Tails |] - let data2 = [| Tails; Head; Head |] - - (0, data1, data2) |||> Array.fold2 (fun acc a b -> - match (a, b) with - | Head, Head -> acc + 1 - | Tails, Tails -> acc + 1 - | _ -> acc - 1) - - Evaluates to 1 - - - - Applies a function to each element of the array, starting from the end, 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)) - - The function to update the state given the input elements. - The input array. - The initial state. - - The state object after the folding function is applied to each element of the array. - - Thrown when the input array is null. - - - - type Count = - { Positive: int - Negative: int - Text: string } - - let sequence = [| 1; 0; -1; -2; 3 |] - let initialState = {Positive = 0; Negative = 0; Text = "" } - - (sequence, initialState) ||> Array.foldBack (fun a acc -> - let text = acc.Text + " " + string a - if a >= 0 then - { acc with - Positive = acc.Positive + 1 - Text = text } - else - { acc with - Negative = acc.Negative + 1 - Text = text }) - - Evaluates to - - { Positive = 2 - Negative = 3 - Text = " 3 -2 -1 0 1" } - - - - - Applies a function to each element of the collection, threading an accumulator argument - through the computation. If the input function is f and the elements are i0...iN then computes - f (... (f s i0)...) iN - - The function to update the state given the input elements. - The initial state. - The input array. - - The final state. - - Thrown when the input array is null. - - - - type Charge = - | In of int - | Out of int - - let inputs = [| In 1; Out 2; In 3 |] - - (0, inputs) ||> Array.fold (fun acc charge -> - match charge with - | In i -> acc + i - | Out o -> acc - o) - - Evaluates to 2 - - - - Tests 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. - - The function to test the input elements. - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - True if all of the array elements satisfy the predicate. - - - - let inputs1 = [| 1; 2; 3 |] - let inputs2 = [| 1; 2; 3 |] - - (inputs1, inputs2) ||> Array.forall2 (=) - - Evaluates to true. - - - - - let items1 = [| 2017; 1; 1 |] - let items2 = [| 2019; 19; 8 |] - - (items1, items2) ||> Array.forall2 (=) - - Evaluates to false. - - - - - let items1 = [| 1; 2; 3 |] - let items2 = [| 1; 2 |] - - (items1, items2) ||> Array.forall2 (=) - - Throws ArgumentException. - - - - Tests 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. - - The function to test the input elements. - The input array. - - True if all of the array elements satisfy the predicate. - - Thrown when the input array is null. - - - - let isEven a = a % 2 = 0 - - [2; 42] |> Array.forall isEven // evaluates to true - - [1; 2] |> Array.forall isEven // evaluates to false - - - - - Returns the index of the last element in the array - that satisfies the given predicate. Raise if - none of the elements satisfy the predicate. - - The function to test the input elements. - The input array. - - Thrown if predicate - never returns true. - Thrown when the input array is null. - - The index of the last element in the array that satisfies the given predicate. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.findIndex (fun elm -> elm % 2 = 0) - - Evaluates to 3 - - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.findIndex (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the index of the first element in the array - that satisfies the given predicate. Raise if - none of the elements satisfy the predicate. - - The function to test the input elements. - The input array. - - Thrown if predicate - never returns true. - Thrown when the input array is null. - - The index of the first element in the array that satisfies the given predicate. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.findIndex (fun elm -> elm % 2 = 0) - - Evaluates to 1 - - - - - let inputs = [| 1; 2; 3; 4; 5 |] - inputs |> Array.findIndex (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the last element for which the given function returns 'true'. - Raise if no such element exists. - - The function to test the input elements. - The input array. - - Thrown if predicate - never returns true. - Thrown when the input array is null. - - The last element for which predicate returns true. - - - - let inputs = [| 2; 3; 4 |] - - inputs |> Array.findBack (fun elm -> elm % 2 = 0) - - Evaluates to 4 - - - - - let inputs = [| 2; 3; 4 |] - - inputs |> Array.findBack (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns the first element for which the given function returns 'true'. - Raise if no such element exists. - - The function to test the input elements. - The input array. - - Thrown when the input array is null. - Thrown if predicate - never returns true. - - The first element for which predicate returns true. - - - - let inputs = [| 1; 2; 3 |] - - inputs |> Array.find (fun elm -> elm % 2 = 0) - - Evaluates to 2 - - - - - let inputs = [| 1; 2; 3 |] - - inputs |> Array.find (fun elm -> elm % 6 = 0) - - Throws KeyNotFoundException - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns "true". - - The function to test the input elements. - The input array. - - An array containing the elements for which the given predicate returns true. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.filter (fun elm -> elm % 2 = 0) - - Evaluates to [| 2; 4 |] - - - - Tests 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. - - The function to test the input elements. - The first input array. - The second input array. - - True if any result from predicate is true. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - - - let inputs1 = [| 1; 2 |] - let inputs2 = [| 1; 2; 0 |] - - (inputs1, inputs2) ||> Array.exists2 (fun a b -> a > b) - - Evaluates to false - - - - - let inputs1 = [| 1; 4 |] - let inputs2 = [| 1; 3; 5 |] - - (inputs1, inputs2) ||> Array.exists2 (fun a b -> a > b) - - Evaluates to true - - - - Tests 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. - - The function to test the input elements. - The input array. - - True if any result from predicate is true. - - Thrown when the input array is null. - - - - let input = [| 1; 2; 3; 4; 5 |] - - input |> Array.exists (fun elm -> elm % 4 = 0) - - Evaluates to true - - - - - let input = [| 1; 2; 3; 4; 5 |] - - input |> Array.exists (fun elm -> elm % 6 = 0) - - Evaluates to false - - - - Returns a new list with the distinct elements of the input array which do not appear in the itemsToExclude sequence, - using generic hash and equality comparisons to compare values. - - A sequence whose elements that also occur in the input array will cause those elements to be - removed from the result. - An array whose elements that are not also in itemsToExclude will be returned. - - An array that contains the distinct elements of array that do not appear in itemsToExclude. - - Thrown when either itemsToExclude or array is null. - - - - let original = [| 1; 2; 3; 4; 5 |] - let itemsToExclude = [| 1; 3; 5 |] - - original |> Array.except itemsToExclude - - Evaluates to [| 2; 4 |] - - - - Returns the only element of the array or None if array is empty or contains more than one element. - - The input array. - - The only element of the array or None. - - Thrown when the input array is null. - - - - let inputs = [| "banana" |] - - inputs |> Array.tryExactlyOne - - Evaluates to Some banana - - - - - let inputs = [| "pear"; "banana" |] - - inputs |> Array.tryExactlyOne - - Evaluates to None - - - - - let inputs: int[] = [| |] - - inputs |> Array.tryExactlyOne - - Evaluates to None - - - - Returns the only element of the array. - - The input array. - - The only element of the array. - - Thrown when the input array is null. - Thrown when the input does not have precisely one element. - - - - let inputs = [| "banana" |] - - inputs |> Array.exactlyOne - - Evaluates to banana - - - - - let inputs = [| "pear"; "banana" |] - - inputs |> Array.exactlyOne - - Throws ArgumentException - - - - - let inputs: int[] = [| |] - - inputs |> Array.exactlyOne - - Throws ArgumentException - - - - Returns an empty array of the given type. - The empty array. - - - - Array.empty // Evaluates to [| |] - - - - - Splits the input array into at most count chunks. - - The maximum number of chunks. - The input array. - - The array split into chunks. - - Thrown when the input array is null. - Thrown when count is not positive. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.splitInto 3 - - Evaluates to seq [| [|1; 2|]; [|3; 4|]; [|5|] |] - - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.splitInto -1 - - Throws ArgumentException - - - - Returns an array 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 array then the later occurrences are discarded. - - A function transforming the array items into comparable keys. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| {Bar = 1 };{Bar = 1}; {Bar = 2}; {Bar = 3} |] - - inputs |> Array.distinctBy (fun foo -> foo.Bar) - - Evaluates to [| { Bar = 1 }; { Bar = 2 }; { Bar = 3 } |] - - - - Returns an array that contains no duplicate entries according to generic hash and - equality comparisons on the entries. - If an element occurs multiple times in the array then the later occurrences are discarded. - - The input array. - - The result array. - - Thrown when the input array is null. - - - - let input = [| 1; 1; 2; 3 |] - - input |> Array.distinct - - Evaluates to [| 1; 2; 3 |] - - - - Divides the input array into chunks of size at most chunkSize. - - The maximum size of each chunk. - The input array. - - The array divided into chunks. - - Thrown when the input array is null. - Thrown when chunkSize is not positive. - - - - let input = [| 1; 2; 3 |] - - input |> Array.chunkBySize 2 - - Evaluates to [| [|1; 2|]; [|3|] |] - - - - - let input = [| 1; 2; 3 |] - - input |> Array.chunkBySize -2 - - Throws ArgumentException - - - - Applies the given function to each element of the array. Returns - the array comprised of the results x for each element where - the function returns Some(x) - - The function to generate options from the elements. - The input array. - - The array of results. - - Thrown when the input array is null. - - - - let input = [| Some 1; None; Some 2 |] - - input |> Array.choose id - - Evaluates to [| 1; 2 |] - - - - - let input = [| 1; 2; 3 |] - - input |> Array.choose (fun n -> if n % 2 = 0 then Some n else None) - - Evaluates to [| 2 |] - - - - Applies the given function to successive elements, returning the first - result where the function returns Some(x) for some x. If the function - never returns Some(x) then is raised. - - The function to generate options from the elements. - The input array. - - Thrown when the input array is null. - Thrown if every result from - chooser is None. - - The first result. - - - - let input = [| 1; 2; 3 |] - - input |> Array.pick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to "2". - - - - - let input = [| 1; 2; 3 |] - - input |> Array.pick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Throws KeyNotFoundException. - - - - - Fills a range of elements of the array with the given value. - - The target array. - The index of the first element to set. - The number of elements to set. - The value to set. - - Thrown when the input array is null. - Thrown when either targetIndex or count is negative. - - - - let target = [| 0; 1; 2; 3; 4; 5 |] - - Array.fill target 3 2 100 - - After evaluation target contains [| 0; 1; 2; 100; 100; 5 |]. - - - - Applies the given function to successive elements, returning the first - result where the function returns Some(x) for some x. If the function - never returns Some(x) then None is returned. - - The function to transform the array elements into options. - The input array. - - The first transformed element that is Some(x). - - Thrown when the input array is null. - - - - let input = [| 1; 2; 3 |] - - input |> Array.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to Some "2". - - - - - let input = [| 1; 2; 3 |] - - input |> Array.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Evaluates to None. - - - - - Returns the first element of the array, or - None if the array is empty. - - The input array. - - Thrown when the input array is null. - - The first element of the array or None. - - - - let inputs = [| "banana"; "pear" |] - - inputs |> Array.tryHead - - Evaluates to Some "banana" - - - - - let inputs : int[] = [| |] - - inputs |> Array.tryHead - - Evaluates to None - - - - Creates an array whose elements are all initially the given value. - - The length of the array to create. - The value for the elements. - - The created array. - - Thrown when count is negative. - - - - Array.create 4 "a" - - Evaluates to a new array containing[| "a"; "a"; "a"; "a" |]. - - - - - let cell = ref "a" - let array = Array.create 2 cell - cell.Value <- "b" - - - Before evaluation of the last line, array contains[| { contents = "a"}; { contents = "a"} |]. - After evaluation of the last line array contains[| { contents = "b"}; { contents = "b"} |]. - Note each entry in the array is the same mutable cell object. - - - - Applies a key-generating function to each element of an array and returns an array yielding unique - keys and their number of occurrences in the original array. - - A function transforming each item of the input array into a key to be - compared against the others. - The input array. - - The result array. - - Thrown when the input array is null. - - - - type Foo = { Bar: string } - - let inputs = [| {Bar = "a"}; {Bar = "b"}; {Bar = "a"} |] - - inputs |> Array.countBy (fun foo -> foo.Bar) - - Evaluates to [| ("a", 2); ("b", 1) |] - - - - Builds a new array that contains the elements of the given array. - - The input array. - - A copy of the input array. - - Thrown when the input array is null. - - - - let source = [| 12; 13; 14 |] - - Array.copy source - - Evaluates to a new array containing[| 12; 13; 14 |]. - - - - Tests if the array contains the specified element. - - The value to locate in the input array. - The input array. - - True if the input array contains the specified element; false otherwise. - - Thrown when the input array is null. - - - - [| 1; 2 |] |> Array.contains 2 // evaluates to true - [| 1; 2 |] |> Array.contains 5 // evaluates to false - - - - - Builds a new array that contains the elements of each of the given sequence of arrays. - - The input sequence of arrays. - - The concatenation of the sequence of input arrays. - - Thrown when the input sequence is null. - - - - let inputs = [ [| 1; 2 |]; [| 3 |]; [| 4; 5 |] ] - - inputs |> Array.concat - - Evaluates to [| 1; 2; 3; 4; 5 |] - - - - Compares two arrays using the given comparison function, element by element. - - A function that takes an element from each array and returns an int. - If it evaluates to a non-zero value iteration is stopped and that value is returned. - The first input array. - The second input array. - - Returns the first non-zero result from the comparison function. If the first array has - a larger element, the return value is always positive. If the second array has a larger - element, the return value is always negative. When the elements are equal in the two - arrays, 1 is returned if the first array is longer, 0 is returned if they are equal in - length, and -1 is returned when the second array is longer. - - Thrown when either of the input arrays - is null. - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1; 10 |] - let input2 = [| 1; 10 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to 0 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1; 5 |] - let input2 = [| 1; 8 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to -1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1; 11 |] - let input2 = [| 1; 13 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1; 2 |] - let input2 = [| 1 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to 1 - - - - - let closerToNextDozen a b = - (a % 12).CompareTo(b % 12) - - let input1 = [| 1 |] - let input2 = [| 1; 2 |] - - (input1, input2) ||> Array.compareWith closerToNextDozen - - Evaluates to -1 - - - - For each element of the array, applies the given function. Concatenates all the results and return the combined array. - - The function to create sub-arrays from the input array elements. - The input array. - - The concatenation of the sub-arrays. - - Thrown when the input array is null. - - - - type Foo = { Bar: int[] } - - let input = [| {Bar = [| 1; 2 |]}; {Bar = [| 3; 4 |]} |] - - input |> Array.collect (fun foo -> foo.Bar) - - Evaluates to [| 1; 2; 3; 4 |] - - - - - let input = [[1; 2]; [3; 4]] - - input |> Array.collect id - - Evaluates to [| 1; 2; 3; 4 |] - - - - Reads a range of elements from the first array and write them into the second. - - The source array. - The starting index of the source array. - The target array. - The starting index of the target array. - The number of elements to copy. - - - Slicing syntax is generally preferred, e.g. - - let source = [| 12; 13; 14 |] - let target = [| 0; 1; 2; 3; 4; 5 |] - target[3..4] <- source[1..2] - - - - Thrown when either of the input arrays is null. - Thrown when any of sourceIndex, targetIndex or count are negative, - or when there aren't enough elements in source or target. - - - - let source = [| 12; 13; 14 |] - let target = [| 0; 1; 2; 3; 4; 5 |] - - Array.blit source 1 target 3 2 - - After evaluation target contains [| 0; 1; 2; 13; 14; 5 |]. - - - - Returns the average of the elements generated by applying the function to each element of the array. - - The function to transform the array elements before averaging. - The input array. - - Thrown when array is empty. - - The computed average. - - Thrown when the input array is null. - - - - type Foo = { Bar: float } - - let input = [| {Bar = 2.0}; {Bar = 4.0} |] - - input |> Array.averageBy (fun foo -> foo.Bar) - - Evaluates to 3.0 - - - - - type Foo = { Bar: float } - - let input : Foo[] = [| |] - - input |> Array.averageBy (fun foo -> foo.Bar) - - Throws ArgumentException - - - - Returns the average of the elements in the array. - - The input array. - - Thrown when array is empty. - Thrown when the input array is null. - - The average of the elements in the array. - - - - [| 1.0; 2.0; 6.0 |] |> Array.average - - Evaluates to 3.0 - - - - - [| |] |> Array.average - - Throws ArgumentException - - - - Builds a new array that contains the elements of the first array followed by the elements of the second array. - - The first input array. - The second input array. - - The resulting array. - - Thrown when either of the input arrays is null. - - - - Array.append [| 1; 2 |] [| 3; 4 |] - - Evaluates to [| 1; 2; 3; 4 |]. - - - - Returns a new array that contains all pairings of elements from the first and second arrays. - - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - - The resulting array of pairs. - - - - ([| 1; 2 |], [| 3; 4 |]) ||> Array.allPairs - - Evaluates to - - [| (1, 3); (1, 4); (2, 3); (2, 4) |] - - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns true. - - The function to test the input elements. - The input array. - - An array containing the elements for which the given predicate returns true. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.Parallel.filter (fun elm -> elm % 2 = 0) - - Evaluates to [| 2; 4 |] - - - - Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException is - raised. - - The first input array. - The second input array. - - Thrown when either of the input arrays is null. - Thrown when the input arrays differ in length. - - The array of tupled elements. - - - - let numbers = [|1; 2|] - let names = [|"one"; "two"|] - - Array.Parallel.zip numbers names - - Evaluates to [| (1, "one"); (2, "two") |]. - - - - Sorts the elements of an array in parallel, in descending order, using the given projection for the keys and returning a new array. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - The sorted array. - - - - let input = [| "a"; "bbb"; "cccc"; "dd" |] - - input |> Array.Parallel.sortByDescending (fun s -> s.Length) - - Evaluates to [|"cccc"; "bbb"; "dd"; "a"|]. - - - - Sorts the elements of an array in parallel, in descending order, returning a new array. Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The input array. - - The sorted array. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - input |> Array.Parallel.sortDescending - - Evaluates to [| 8; 6; 4; 3; 1; 1 |]. - - - - Sorts the elements of an array by mutating the array in-place in parallel, using the given comparison function. - Elements are compared using . - - The input array. - - Thrown when the input array is null. - - - - let array = [| 8; 4; 3; 1; 6; 1 |] - - Array.sortInPlace array - - After evaluation array contains [| 1; 1; 3; 4; 6; 8 |]. - - - - Sorts the elements of an array by mutating the array in-place in parallel, using the given comparison function as the order. - - The function to compare pairs of array elements. - The input array. - - Thrown when the input array is null. - - The following sorts entries using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let array = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |] - - array |> Array.Parallel.sortInPlaceWith compareEntries - - After evaluation array contains [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. - - - - Sorts the elements of an array by mutating the array in-place in parallel, using the given projection for the keys. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - Thrown when the input array is null. - - - - let array = [| "a"; "bbb"; "cccc"; "dd" |] - - array |> Array.Parallel.sortInPlaceBy (fun s -> s.Length) - - After evaluation array contains [|"a"; "dd"; "bbb"; "cccc"|]. - - - - Sorts the elements of an array in parallel, using the given comparison function as the order, returning a new array. - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to compare pairs of array elements. - The input array. - - The sorted array. - - Thrown when the input array is null. - - Sort an array of pairs using a comparison function that compares string lengths then index numbers: - - let compareEntries (n1: int, s1: string) (n2: int, s2: string) = - let c = compare s1.Length s2.Length - if c <> 0 then c else - compare n1 n2 - - let input = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |] - - input |> Array.Parallel.sortWith compareEntries - - Evaluates to [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]. - - - - Sorts the elements of an array in parallel, using the given projection for the keys and returning a new array. - Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The function to transform array elements into the type that is compared. - The input array. - - The sorted array. - - Thrown when the input array is null. - - - - let input = [| "a"; "bbb"; "cccc"; "dd" |] - - input |> Array.Parallel.sortBy (fun s -> s.Length) - - Evaluates to [|"a"; "dd"; "bbb"; "cccc"|]. - - - - Sorts the elements of an array in parallel, returning a new array. Elements are compared using . - - This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. - For a stable sort, consider using . - - The input array. - - The sorted array. - - Thrown when the input array is null. - - - - let input = [| 8; 4; 3; 1; 6; 1 |] - - Array.Parallel.sort input - - Evaluates to [| 1; 1 3; 4; 6; 8 |]. - - - - 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 . - The order in which the given function is applied to indices is not specified. - - The function to test the input elements. - The input array. - - The two arrays of results. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4 |] - - inputs |> Array.Parallel.partition (fun x -> x % 2 = 0) - - Evaluates to ([|2; 4|], [|1; 3|]). - - - - Create an array given the dimension and a generator function to compute the elements. - - Performs the operation in parallel using . - The order in which the given function is applied to indices is not specified. - - - - - The array of results. - - - - Array.Parallel.init 4 (fun v -> v + 5) - - Evaluates to [| 5; 6; 7; 8 |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.Parallel.iteri (fun i v -> printfn "{i}: {v}") - - Evaluates to unit and prints the following to the console in an unspecified order: - - 0: a - 2: c - 1: b - - - - - Apply the given function to each element of the array. - - Performs the operation in parallel using . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "b"; "c" |] - - inputs |> Array.Parallel.iter (printfn "%s") - - Evaluates to unit and prints the following to the console in an unspecified order: - - a - c - b - - - - - Applies a key-generating function to each element of an array in parallel and yields an array of - unique keys. Each unique key contains an array of all elements that match - to this key. - - Performs the operation in parallel using . - The order in which the given function is applied to elements of the input array is not specified. - The order of the keys and values in the result is also not specified - A function that transforms an element of the array into a comparable key. - The input array. - - The result array. - - Thrown when the input array is null. - - - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.Parallel.groupBy (fun n -> n % 2) - - Evaluates to [| (1, [| 1; 3; 5 |]); (0, [| 2; 4 |]) |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - The array of results. - - Thrown when the input array is null. - - - - let inputs = [| 10; 10; 10 |] - - inputs |> Array.Parallel.mapi (fun i x -> i + x) - - Evaluates to [| 10; 11; 12 |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - The array of results. - - Thrown when the input array is null. - - - - let inputs = [| "a"; "bbb"; "cc" |] - - inputs |> Array.Parallel.map (fun x -> x.Length) - - Evaluates to [| 1; 3; 2 |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - - The input array. - - 'U[] - - Thrown when the input array is null. - - - - type Foo = { Bar: int[] } - - let input = [| {Bar = [| 1; 2 |]}; {Bar = [| 3; 4 |]} |] - - input |> Array.Parallel.collect (fun foo -> foo.Bar) - - Evaluates to [| 1; 2; 3; 4 |] - - - - - let input = [| [| 1; 2 |]; [| 3; 4 |] |] - - input |> Array.Parallel.collect id - - Evaluates to [| 1; 2; 3; 4 |] - - - - 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 . - The order in which the given function is applied to elements of the input array is not specified. - - The function to generate options from the elements. - The input array. - - The array of results. - - Thrown when the input array is null. - - - - let input = [| Some 1; None; Some 2 |] - - input |> Array.Parallel.choose id - - Evaluates to [| 1; 2 |] - - - - - let input = [| 1; 2; 3 |] - - input |> Array.Parallel.choose (fun n -> if n % 2 = 0 then Some n else None) - - Evaluates to [| 2 |] - - - - Returns the average of the elements generated by applying the function to each element of the array. - - The function to transform the array elements before averaging. - The input array. - - Thrown when array is empty. - - The computed average. - - Thrown when the input array is null. - - - - type Foo = { Bar: float } - - let input = [| {Bar = 2.0}; {Bar = 4.0} |] - - input |> Array.Parallel.averageBy (fun foo -> foo.Bar) - - Evaluates to 3.0 - - - - - type Foo = { Bar: float } - - let input : Foo[] = [| |] - - input |> Array.Parallel.averageBy (fun foo -> foo.Bar) - - Throws ArgumentException - - - - Returns the average of the elements in the array. - - The input array. - - Thrown when array is empty. - Thrown when the input array is null. - - The average of the elements in the array. - - - - [| 1.0; 2.0; 6.0 |] |> Array.Parallel.average - - Evaluates to 3.0 - - - - - [| |] |> Array.Parallel.average - - Throws ArgumentException - - - - Returns the sum of the results generated by applying the function to each element of the array. - - The function to transform the array elements into the type to be summed. - The input array. - - The resulting sum. - - Thrown when the input array is null. - - - - let input = [| "aa"; "bbb"; "cc" |] - - input |> Array.Parallel.sumBy (fun s -> s.Length) - - Evaluates to 7. - - - - Returns the sum of the elements in the array. - - The input array. - - The resulting sum. - - Thrown when the input array is null. - - - - let input = [| 1; 5; 3; 2 |] - - input |> Array.Parallel.sum - - Evaluates to 11. - - - - Returns the lowest of all elements of the array, compared via Operators.min on the function result. - - Throws ArgumentException for empty arrays. - - The function to transform the elements into a type supporting comparison. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The minimum element. - - - - let inputs = [| "aaa"; "b"; "cccc" |] - - inputs |> Array.Parallel.minBy (fun s -> s.Length) - - Evaluates to "b" - - - - - let inputs: string[]= [| |] - - inputs |> Array.Parallel.minBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the smallest of all elements of the array, compared via Operators.min. - - Throws ArgumentException for empty arrays - - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The minimum element. - - - - let inputs = [| 10; 12; 11 |] - - inputs |> Array.Parallel.min - - Evaluates to 10 - - - - - let inputs: int[]= [| |] - - inputs |> Array.Parallel.min - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the array, compared via Operators.max on the function result. - - Throws ArgumentException for empty arrays. - - The function to transform the elements into a type supporting comparison. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The maximum element. - - - - let inputs = [| "aaa"; "b"; "cccc" |] - - inputs |> Array.Parallel.maxBy (fun s -> s.Length) - - Evaluates to "cccc" - - - - - let inputs: string[]= [| |] - - inputs |> Array.Parallel.maxBy (fun s -> s.Length) - - Throws System.ArgumentException. - - - - Returns the greatest of all elements of the array, compared via Operators.max. - - Throws ArgumentException for empty arrays. - - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The maximum element. - - - - let inputs = [| 10; 12; 11 |] - - inputs |> Array.Parallel.max - - Evaluates to 12 - - - - - let inputs: int[]= [| |] - - inputs |> Array.Parallel.max - - Throws System.ArgumentException. - - - - Applies a projection function to each element of the array in parallel, reducing elements in each thread with a dedicated 'reduction' function. - After processing entire input, results from all threads are reduced together. - Raises ArgumentException if the array is empty. - The order of processing is not guaranteed. For that reason, the 'reduction' function argument should be commutative. - (That is, changing the order of execution must not affect the result) - - The function to project from elements of the input array - The function to reduce a pair of projected elements to a single element. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - The final result of the reductions. - - - - let inputs = [| "1"; "3"; "4"; "2" |] - - inputs |> Array.Parallel.reduceBy (fun x -> int x) (+) - - Evaluates to 1 + 3 + 4 + 2. However, the system could have decided to compute (1+3) and (4+2) first, and then put them together. - - - - Applies a function to each element of the array in parallel, threading an accumulator argument - through the computation for each thread involved in the computation. After processing entire input, results from all threads are reduced together. - Raises ArgumentException if the array is empty. - The order of processing is not guaranteed. For that reason, the 'reduce' function argument should be commutative. - (That is, changing the order of execution must not affect the result) - Also, compared to the non-parallel version of Array.reduce, the 'reduce' function may be invoked more times due to the resulting reduction from participating threads. - - The function to reduce a pair of elements to a single element. - The input array. - - Thrown when the input array is null. - Thrown when the input array is empty. - - Result of the reductions. - - - - let inputs = [| 1; 3; 4; 2 |] - - inputs |> Array.Parallel.reduce (fun a b -> a + b) - - Evaluates to 1 + 3 + 4 + 2. However, the system could have decided to compute (1+3) and (4+2) first, and then put them together. - - - - Applies the given function to successive elements, returning the first - result where the function returns Some(x) for some x. If the function - never returns Some(x) then None is returned. - - The function to transform the array elements into options. - The input array. - - The first transformed element that is Some(x). - - Thrown when the input array is null. - - - - let input = [| 1; 2; 3 |] - - input |> Array.Parallel.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None) - - Evaluates to Some 2. - - - - - let input = [| 1; 2; 3 |] - - input |> Array.Parallel.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None) - - Evaluates to None. - - - - - Returns the index of the first element in the array - that satisfies the given predicate. - Returns None if no such element exists. - The function to test the input elements. - The input array. - - Thrown when the input array is null. - - The index of the first element that satisfies the predicate, or None. - - Try to find the index of the first even number: - - let inputs = [| 1; 2; 3; 4; 5 |] - - inputs |> Array.Parallel.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to Some 1 - - - Try to find the index of the first even number: - - let inputs = [| 1; 3; 5; 7 |] - - inputs |> Array.Parallel.tryFindIndex (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Returns the first element for which the given function returns True. - Returns None if no such element exists. - - The function to test the input elements. - The input array. - - The first element that satisfies the predicate, or None. - - Thrown when the input array is null. - - Try to find the first even number: - - let inputs = [| 1; 2; 3 |] - - inputs |> Array.Parallel.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to Some 2. - - - Try to find the first even number: - - let inputs = [| 1; 5; 3 |] - - inputs |> Array.Parallel.tryFind (fun elm -> elm % 2 = 0) - - Evaluates to None - - - - Tests if any element of the array satisfies the given predicate. - - The predicate is applied to the elements of the input array in parallel. If any application - returns true then the overall result is true and testing of other elements in all threads is stopped at system's earliest convenience. - Otherwise, false is returned. - - The function to test the input elements. - The input array. - - True if any result from predicate is true. - - Thrown when the input array is null. - - - - let input = [| 1; 2; 3; 4; 5 |] - - input |> Array.Parallel.exists (fun elm -> elm % 4 = 0) - - Evaluates to true - - - - - let input = [| 1; 2; 3; 4; 5 |] - - input |> Array.Parallel.exists (fun elm -> elm % 6 = 0) - - Evaluates to false - - - - Tests if all elements of the array satisfy the given predicate. - - The predicate is applied to the elements of the input collection in parallel. If any application - returns false then the overall result is false and testing of other elements in all threads is stopped at system's earliest convenience. - Otherwise, true is returned. - - The function to test the input elements. - The input array. - - True if all of the array elements satisfy the predicate. - - Thrown when the input array is null. - - - - let isEven a = a % 2 = 0 - - [2; 42] |> Array.Parallel.forall isEven // evaluates to true - - [1; 2] |> Array.Parallel.forall isEven // evaluates to false - - - - - Provides parallel operations on arrays - - - Contains operations for working with arrays. - - - See also F# Language Guide - Arrays. - - - - Sets the value of an element in an array. You can also - use the syntax 'array.[index1,index2,index3,index4] <- value'. - - The input array. - The index along the first dimension. - The index along the second dimension. - The index along the third dimension. - The index along the fourth dimension. - The value to set. - - - Indexer syntax is generally preferred, e.g. - - let array: float[,,,] = Array4D.zeroCreate 2 3 4 5 - - array[0,2,1,3] <- 5.0 - - - - - - let array = Array4D.zeroCreate 2 3 4 5 - - Array4D.2et array 0 2 1 3 5.0 - - - - - Fetches an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' - - The input array. - The index along the first dimension. - The index along the second dimension. - The index along the third dimension. - The index along the fourth dimension. - - The value at the given index. - - - Indexer syntax is generally preferred, e.g. - - let array: float[,,,] = Array4D.zeroCreate 2 3 4 5 - - array[0,2,1,3] - - - - - - let array = Array4D.zeroCreate 2 3 4 5 - - Array4D.get array 0 2 1 3 - - - - - Creates an array where the entries are initially the "default" value. - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The length of the fourth dimension. - - The created array. - - - - let array : float[,,,] = Array4D.zeroCreate 2 3 3 5 - - After evaluation array is a 2x3x3x5 array with contents all zero. - - - - Returns the length of an array in the fourth dimension. - - The input array. - - The length of the array in the fourth dimension. - - - - let array = Array4D.init 2 3 4 5 (fun i j k -> 100*i + 10*j + k) - - array |> Array4D.length4 - - Evaluates to 5. - - - - Returns the length of an array in the third dimension. - - The input array. - - The length of the array in the third dimension. - - - - let array = Array4D.init 2 3 4 5 (fun i j k -> 100*i + 10*j + k) - - array |> Array4D.length3 - - Evaluates to 4. - - - - Returns the length of an array in the second dimension. - - The input array. - - The length of the array in the second dimension. - - - - let array = Array4D.init 2 3 4 5 (fun i j k -> 100*i + 10*j + k) - - array |> Array4D.length2 - - Evaluates to 3. - - - - Returns the length of an array in the first dimension - - The input array. - - The length of the array in the first dimension. - - - - let array = Array4D.init 2 3 4 5 (fun i j k -> 100*i + 10*j + k) - - array |> Array4D.length1 - - Evaluates to 2. - - - - Creates an array given the dimensions and a generator function to compute the elements. - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The length of the fourth dimension. - The function to create an initial value at each index in the array. - - The created array. - - - - Array4D.init 2 2 2 2 (fun i j k l -> i*1000+j*100+k*10+l) - - Evaluates to a 2x2x2x2 array with contents [[[[0; 1]; [10; 11]]; [[100; 101]; [110; 111]]];[[[1000; 1]; [1010; 1011]]; [[1100; 1101]; [1110; 1111]]]] - - - - - Creates an array whose elements are all initially the given value - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The length of the fourth dimension. - The initial value for each element of the array. - - The created array. - - - - Array4D.create 2 2 2 2 1 - - Evaluates to a 2x2x2x2 array with all entries 1 - - - - - Contains operations for working with rank 4 arrays. - - - Creates an array where the entries are initially the "default" value. - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - - The created array. - - - - let array : float[,,] = Array3D.zeroCreate 2 3 3 - - After evaluation array is a 2x3x3 array with contents all zero. - - - - Sets the value of an element in an array. You can also - use the syntax 'array.[index1,index2,index3] <- value'. - - The input array. - The index along the first dimension. - The index along the second dimension. - The index along the third dimension. - The value to set at the given index. - - - Indexer syntax is generally preferred, e.g. - - let array = Array3D.zeroCreate 2 3 3 - - array[0,2,1] < 4.0 - - Evaluates to 11. - - - - - let array = Array3D.zeroCreate 2 3 3 - - Array3D.set array 0 2 1 4.0 - - After evaluation array is a 2x3x3 array with contents [[[0.0; 0.0; 0.0]; [0.0; 4.0; 0.0]]; [[0.0; 0.0; 0.0]; [0.0; 0.0; 0.0]]] - - - - Builds 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 propagated to the output - array. - The function to transform the elements at each index in the array. - The input array. - - The array created from the transformed elements. - - - - let inputs = Array3D.zeroCreate 2 3 3 - - inputs |> Array3D.mapi (fun i j k v -> 100*i + 10*j + k) - - Evaluates to a 2x3x3 array with contents [[[0; 2; 4]; [20; 22; 24]]; [[200; 202; 204]; [220; 222; 224]]] - - - - Builds 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 propagated to the output - array. - The function to transform each element of the array. - The input array. - - The array created from the transformed elements. - - - - let inputs = Array3D.init 2 3 3 (fun i j k -> 100*i + 10*j + k) - - inputs |> Array3D.map (fun v -> 2 * v) - - Evaluates to a 2x3x3 array with contents [[[0; 2; 4]; [20; 22; 24]]; [[200; 202; 204]; [220; 222; 224]]] - - - - Returns the length of an array in the third dimension. - - The input array. - - The length of the array in the third dimension. - - - - let array = Array3D.init 2 3 4 (fun i j k -> 100*i + 10*j + k) - - array |> Array3D.length3 - - Evaluates to 4. - - - - Returns the length of an array in the second dimension. - - The input array. - - The length of the array in the second dimension. - - - - let array = Array3D.init 2 3 4 (fun i j k -> 100*i + 10*j + k) - - array |> Array3D.length2 - - Evaluates to 3. - - - - Returns the length of an array in the first dimension - - The input array. - - The length of the array in the first dimension. - - - - let array = Array3D.init 2 3 4 (fun i j k -> 100*i + 10*j + k) - - array |> Array3D.length1 - - Evaluates to 2. - - - - Applies the given function to each element of the array. The integer indices passed to the - function indicates the index of element. - - The function to apply to each element of the array. - The input array. - - - - let inputs = Array3D.init 2 2 3 (fun i j k -> 100*i + 10*j + k) - - inputs |> Array3D.iteri (fun i j k v -> printfn $"value at ({i},{j},{k}) = {v}") - - Evaluates to unit and prints - - value at (0,0,0) = 0 - value at (0,0,1) = 1 - value at (0,0,2) = 2 - value at (0,1,0) = 10 - value at (0,1,1) = 11 - value at (0,1,2) = 12 - value at (1,0,0) = 100 - value at (1,0,1) = 101 - value at (1,0,2) = 102 - value at (1,1,0) = 110 - value at (1,1,1) = 111 - value at (1,1,2) = 112 - - in the console. - - - - Applies the given function to each element of the array. - - The function to apply to each element of the array. - The input array. - - - - let inputs = Array3D.init 2 2 3 (fun i j k -> 100*i + 10*j + k) - - inputs |> Array3D.iter (fun v -> printfn $"value = {v}") - - Evaluates to unit and prints - - value = 0 - value = 1 - value = 2 - value = 10 - value = 11 - value = 12 - value = 100 - value = 101 - value = 102 - value = 110 - value = 111 - value = 112 - - in the console. - - - - Fetches an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' - - The input array. - The index along the first dimension. - The index along the second dimension. - The index along the third dimension. - - The value at the given index. - - - Indexer syntax is generally preferred, e.g. - - let array = Array3D.init 2 3 3 (fun i j k -> 100*i + 10*j + k) - - array[0,2,1] - - Evaluates to 11. - - - - - let array = Array3D.init 2 3 3 (fun i j k -> 100*i + 10*j + k) - - Array3D.get array 0 2 1 - - Evaluates to 21. - - - - Creates an array given the dimensions and a generator function to compute the elements. - - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The function to create an initial value at each index into the array. - - The created array. - - - - Array3D.init 2 2 3 (fun i j k -> 100*i + 10*j + k) - - Evaluates to a 2x2x3 array with contents [[[0; 1; 2]; [10; 11; 12]]; [[100; 101; 102]; [110; 111; 112]]] - - - - Creates an array whose elements are all initially the given value. - The length of the first dimension. - The length of the second dimension. - The length of the third dimension. - The value of the array elements. - - The created array. - - - - Array3D.create 2 2 3 1 - - Evaluates to a 2x3 array with contents [[[1; 1; 1]; [1; 1; 1]]; [[1; 1; 1]; [1; 1; 1]]] - - - - - Contains operations for working with rank 3 arrays. - - - See also F# Language Guide - Arrays. - - - - Returns binding for the largest key in the map. - Raise KeyNotFoundException when map is empty. - - The input map. - Thrown if the map is empty. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.maxKeyValue // evaluates to (2, "b") - - - - - Returns binding for the smallest key in the map. - Raise KeyNotFoundException when map is empty. - - The input map. - Thrown if the map is empty. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.minKeyValue // evaluates to (1, "a") - - - - - The values in the map, including the duplicates. - The sequence will be ordered by the keys of the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.values // evaluates to seq ["a"; "b"] - - - - - The keys in the map. - The sequence will be ordered by the keys of the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.keys // evaluates to seq [1; 2] - - - - - The number of bindings in the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.count // evaluates to 2 - - - - - Returns the key of the first mapping in the collection that satisfies the given predicate. - Returns 'None' if no such element exists. - - The function to test the input elements. - The input map. - - The first key for which the predicate returns true or None if the predicate evaluates to false for each key/value pair. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.tryFindKey (fun n s -> n = s.Length) // evaluates to Some 1 - sample |> Map.tryFindKey (fun n s -> n < s.Length) // evaluates to None - - - - - 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. - - The function to test the input elements. - The input map. - Thrown if the key does not exist in the map. - - The first key for which the predicate evaluates true. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.findKey (fun n s -> n = s.Length) // evaluates to 1 - sample |> Map.findKey (fun n s -> n < s.Length) // throws KeyNotFoundException - - - - - 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 input key. - The input map. - - The found Some value or None. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.tryFind 1 // evaluates to Some "a" - sample |> Map.tryFind 3 // evaluates to None - - - - - Removes an element from the domain of the map. No exception is raised if the element is not present. - - The input key. - The input map. - - The resulting map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.remove 1 // evaluates to map [(2, "b")] - sample |> Map.remove 3 // equal to sample - - - - - Builds two new maps, one containing the bindings for which the given predicate returns 'true', - and the other the remaining bindings. - - The function to test the input elements. - The input map. - - A pair of maps in which the first contains the elements for which the predicate returned true - and the second containing the elements for which the predicated returned false. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.partition (fun n s -> n = s.Length) // evaluates to (map [(1, "a")], map [(2, "b")]) - - - - - Tests if an element is in the domain of the map. - - The input key. - The input map. - - True if the map contains the key. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.containsKey 1 // evaluates to true - sample |> Map.containsKey 3 // evaluates to false - - - - - Builds a new collection whose elements are the results of applying the given function - to each of the elements of the collection. The key passed to the - function indicates the key of element being transformed. - - The function to transform the key/value pairs. - The input map. - - The resulting map of keys and transformed values. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.map (fun n s -> sprintf "%i %s" n s) // evaluates to map [(1, "1 a"); (2, "2 b")] - - - - - Returns true if the given predicate returns true for all of the - bindings in the map. - - The function to test the input elements. - The input map. - - True if the predicate evaluates to true for all of the bindings in the map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.forall (fun n s -> n >= s.Length) // evaluates to true - sample |> Map.forall (fun n s -> n = s.Length) // evaluates to false - - - - - Builds a new map containing only the bindings for which the given predicate returns 'true'. - - The function to test the key/value pairs. - The input map. - - The filtered map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.filter (fun n s -> n = s.Length) // evaluates to map [(1, "a")] - - - - - Returns true if the given predicate returns true for one of the - bindings in the map. - - The function to test the input elements. - The input map. - - True if the predicate returns true for one of the key/value pairs. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.exists (fun n s -> n = s.Length) // evaluates to true - sample |> Map.exists (fun n s -> n < s.Length) // evaluates to false - - - - - Applies the given function to each binding in the dictionary - - The function to apply to each key/value pair. - The input map. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.iter (fun n s -> printf "%i %s " n s) - - Prints "1 a 2 b ". - - - - Folds over the bindings in the map - - The function to update the state given the input key/value pairs. - The initial state. - The input map. - - The final state value. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - ("initial", sample) ||> Map.fold (fun state n s -> sprintf "%s %i %s" state n s) - - Evaluates to "initial 1 a 2 b". - - - - Folds over the bindings in the map. - - The function to update the state given the input key/value pairs. - The input map. - The initial state. - - The final state value. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - (sample, "initial") ||> Map.foldBack (fun n s state -> sprintf "%i %s %s" n s state) - - Evaluates to "1 a 2 b initial" - - - - Searches the map looking for the first element where the given function returns a Some value. - Raise KeyNotFoundException if no such element exists. - - The function to generate options from the key/value pairs. - The input map. - Thrown if no element returns a Some - value when evaluated by the chooser function - - The first result. - - - - let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ] - - sample |> Map.pick (fun n s -> if n > 5 && s.Length > 2 then Some s else None) - - Evaluates to "ccc" - - - - let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ] - - sample |> Map.pick (fun n s -> if n > 5 && s.Length > 4 then Some s else None) - - Raises KeyNotFoundException - - - - Searches the map looking for the first element where the given function returns a Some value. - - The function to generate options from the key/value pairs. - The input map. - - The first result. - - - - let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ] - - sample |> Map.tryPick (fun n s -> if n > 5 && s.Length > 2 then Some s else None) - - Evaluates to Some "ccc". - - - - - let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ] - - sample |> Map.tryPick (fun n s -> if n > 5 && s.Length > 4 then Some s else None) - - Evaluates to None. - - - - Lookup an element in the map, raising KeyNotFoundException if no binding - exists in the map. - - The input key. - The input map. - Thrown when the key does not exist in the map. - - The value mapped to the given key. - - - - let sample = Map [ (1, "a"); (2, "b") ] - - sample |> Map.find 1 // evaluates to "a" - sample |> Map.find 3 // throws KeyNotFoundException - - - - - The empty map. - - - - let emptyMap = Map.empty<int, string> - - - - - Is the map empty? - - The input map. - - True if the map is empty. - - - - let emptyMap = Map.empty<int, string> - emptyMap |> Map.isEmpty // evaluates to true - - let notEmptyMap = Map [ (1, "a"); (2, "b") ] - emptyMap |> Map.isEmpty // evaluates to false - - - - - Returns an array of all key-value pairs in the mapping. - The array will be ordered by the keys of the map. - - The input map. - - The array of key/value pairs. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.toArray // evaluates to [|(1, "a"); (2, "b")|] - - - - - Returns a list of all key-value pairs in the mapping. - The list will be ordered by the keys of the map. - - The input map. - - The list of key/value pairs. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.toList // evaluates to [(1, "a"); (2, "b")] - - - - - Views the collection as an enumerable sequence of pairs. - The sequence will be ordered by the keys of the map. - - The input map. - - The sequence of key/value pairs. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.toSeq // evaluates to seq [(1, "a"); (2, "b")] - - - - - Returns a new map made from the given bindings. - - The input sequence of key/value pairs. - - The resulting map. - - - - let input = seq { (1, "a"); (2, "b") } - - input |> Map.ofSeq // evaluates to map [(1, "a"); (2, "b")] - - - - - Returns a new map made from the given bindings. - - The input array of key/value pairs. - - The resulting map. - - - - let input = [| (1, "a"); (2, "b") |] - - input |> Map.ofArray // evaluates to map [(1, "a"); (2, "b")] - - - - - Returns a new map made from the given bindings. - - The input list of key/value pairs. - - The resulting map. - - - - let input = [ (1, "a"); (2, "b") ] - - input |> Map.ofList // evaluates to map [(1, "a"); (2, "b")] - - - - - Returns a new map with the value stored under key changed according to f. - - The input key. - The change function. - The input map. - - The resulting map. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.change 1 (fun x -> - match x with - | Some s -> Some (s + "z") - | None -> None - ) // evaluates to map [(1, "az"); (2, "b")] - - - - - Returns a new map with the binding added to the given map. - If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. - - The input key. - The input value. - The input map. - - The resulting map. - - - - let input = Map [ (1, "a"); (2, "b") ] - - input |> Map.add 3 "c" // evaluates to map [(1, "a"); (2, "b"); (3, "c")] - input |> Map.add 2 "aa" // evaluates to map [(1, "a"); (2, "aa")] - - - - - Contains operations for working with values of type . - - - Returns a new set with the elements of the second set removed from the first. - - The first input set. - The set whose elements will be removed from set1. - - The set with the elements of set2 removed from set1. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"The difference of {set1} and {set2} is {Set.difference set1 set2}" - - The sample evaluates to the following output: The difference of set [1; 2; 3] and set [2; 3; 4] is set [1] - - - - Builds a new collection from the given enumerable object. - - The input sequence. - - The set containing elements. - - - - let set = Set.ofSeq [1, 2, 3] - printfn $"The set is {set} and type is {set.GetType().Name}" - - The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1" - - - - Returns an ordered view of the collection as an enumerable object. - - The input set. - - An ordered sequence of the elements of set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - let seq = Set.toSeq set - printfn $"The set is {set} and type is {seq.GetType().Name}" - - The sample evaluates to the following output: he set is set [1; 2; 3] and type is Microsoft.FSharp.Collections.FSharpSet`1[System.Int32] - - - - Builds an array that contains the elements of the set in order. - - The input set. - - An ordered array of the elements of set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - let array = Set.toArray set - printfn$ "The set is {set} and type is {array.GetType().Name}" - - The sample evaluates to the following output: The set is [|1; 2; 3|] and type is System.Int32[] - - - - Builds a set that contains the same elements as the given array. - - The input array. - - A set containing the elements of array. - - - - let set = Set.ofArray [|1, 2, 3|] - printfn $"The set is {set} and type is {set.GetType().Name}" - - The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1" - - - - Builds a list that contains the elements of the set in order. - - The input set. - - An ordered list of the elements of set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - let list = Set.toList set - printfn $"The set is {list} and type is {list.GetType().Name}" - - The sample evaluates to the following output: The set is [1; 2; 3] and type is "FSharpList`1" - - - - Builds a set that contains the same elements as the given list. - - The input list. - - A set containing the elements form the input list. - - - - let set = Set.ofList [1, 2, 3] - printfn $"The set is {set} and type is {set.GetType().Name}" - - The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1" - - - - Returns the highest element in the set according to the ordering being used for the set. - - The input set. - - The max value from the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The min element of {set} is {Set.minElement set}" - - The sample evaluates to the following output: The max element of set [1; 2; 3] is 3 - - - - Returns the lowest element in the set according to the ordering being used for the set. - - The input set. - - The min value from the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The min element of {set} is {Set.minElement set}" - - The sample evaluates to the following output: The min element of set [1; 2; 3] is 1 - - - - Returns a new set with the given element removed. No exception is raised if - the set doesn't contain the given element. - - The element to remove. - The input set. - - The input set with value removed. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The set without 1 is {Set.remove 1 set}" - - The sample evaluates to the following output: The set without 1 is set [2; 3] - - - - Splits the set into two sets containing the elements for which the given predicate - returns true and false respectively. - - The function to test set elements. - The input set. - - A pair of sets with the first containing the elements for which predicate returns - true and the second containing the elements for which predicate returns false. - - - - let set = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"The set with even numbers is {Set.partition (fun x -> x % 2 = 0) set}" - - The sample evaluates to the following output: The partitioned sets are: (set [2; 4], set [1; 3]) - - - - Applies the given function to each element of the set, in order according - to the comparison function. - - The function to apply to each element. - The input set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - Set.iter (fun x -> printfn $"The set contains {x}") set - - The sample evaluates to the following output: - The set contains 1 - The set contains 2 - The set contains 3 - - - - Returns "true" if the set is empty. - - The input set. - - True if set is empty. - - - - let set = Set.empty.Add(2).Add(3) - printfn $"Is the set empty? {set.IsEmpty}" - - The sample evaluates to the following output: Is the set empty? false - - - - Computes the union of a sequence of sets. - - The sequence of sets to union. - - The union of the input sets. - - - - let headersByFile = seq{ - yield [ "id"; "name"; "date"; "color" ] - yield [ "id"; "age"; "date" ] - yield [ "id"; "sex"; "date"; "animal" ] - } - headersByFile - |> Seq.map Set.ofList - |> Set.intersectMany - |> printfn "The intersection of %A is %A" headersByFile - - The sample evaluates to the following output: The union of seq - [["id"; "name"; "date"; "color"]; ["id"; "age"; "date"]; - ["id"; "sex"; "date"; "animal"]] is set ["age"; "animal"; "color"; "date"; "id"; "name"; "sex"] - - - - Computes the union of the two sets. - - The first input set. - The second input set. - - The union of set1 and set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"The union of {set1} and {set2} is {(Set.union set1 set2)}" - - The sample evaluates to the following output: The union of set [1; 2; 3] and set [2; 3; 4] is set [1; 2; 3; 4] - - - - Computes the intersection of a sequence of sets. The sequence must be non-empty. - - The sequence of sets to intersect. - - The intersection of the input sets. - - - - let headersByFile = seq{ - yield [ "id"; "name"; "date"; "color" ] - yield [ "id"; "age"; "date" ] - yield [ "id"; "sex"; "date"; "animal" ] - } - headersByFile - |> Seq.map Set.ofList - |> Set.intersectMany - |> printfn "The intersection of %A is %A" headersByFile - - The sample evaluates to the following output: The intersection of seq - [["id"; "name"; "date"; "color"]; ["id"; "age"; "date"]; - ["id"; "sex"; "date"; "animal"]] is set ["date"; "id"] - - - - Computes the intersection of the two sets. - - The first input set. - The second input set. - - The intersection of set1 and set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(2).Add(3).Add(4) - printfn $"The intersection of {set1} and {set2} is {Set.intersect set1 set2}" - - The sample evaluates to the following output: The intersection of set [1; 2; 3] and set [2; 3; 4] is set [2; 3] - - - - Tests 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. - - The function to test set elements. - The input set. - - True if all elements of set satisfy predicate. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"Does the set contain even numbers? {Set.forall (fun x -> x % 2 = 0) set}" - - The sample evaluates to the following output: Does the set contain even numbers? false - - - - Applies the given accumulating function to all the elements of the set. - - The accumulating function. - The input set. - The initial state. - - The final state. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The sum of the set is {Set.foldBack (+) set 0}" - printfn $"The set is {Set.foldBack (fun x acc -> x :: acc) set []}" - - The sample evaluates to the following output: The sum of the set is 6 - The set is [1; 2; 3] - - - - Applies the given accumulating function to all the elements of the set - - The accumulating function. - The initial state. - The input set. - - The final state. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The sum of the set is {Set.fold (+) 0 set}" - printfn $"The product of the set is {Set.fold (*) 1 set}" - printfn $"The reverse of the set is {Set.fold (fun x y -> y :: x) [] set}" - - The sample evaluates to the following output: The sum of the set is 6 - The product of the set is 6 - The reverse of the set is [3; 2; 1] - - - - Returns a new collection containing the results of applying the - given function to each element of the input set. - - The function to transform elements of the input set. - The input set. - - A set containing the transformed elements. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The set with doubled values is {Set.map (fun x -> x * 2) set}" - - The sample evaluates to the following output: The set with doubled values is set [2; 4; 6] - - - - Returns a new collection containing only the elements of the collection - for which the given predicate returns True. - - The function to test set elements. - The input set. - - The set containing only the elements for which predicate returns true. - - - - let set = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"The set with even numbers is {Set.filter (fun x -> x % 2 = 0) set}" - - The sample evaluates to the following output: The set with even numbers is set [2; 4] - - - - Tests if any element of the collection satisfies the given predicate. - If the input function is predicate and the elements are i0...iN - then computes p i0 or ... or p iN. - - The function to test set elements. - The input set. - - True if any element of set satisfies predicate. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"Does the set contain 1? {Set.exists (fun x -> x = 1) set}" - - The sample evaluates to the following output: Does the set contain 1? true - - - - Returns the number of elements in the set. Same as size. - - The input set. - - The number of elements in the set. - - - - let set = Set.empty.Add(1).Add(2).Add(3) - printfn $"The set has {set.Count} elements" - - The sample evaluates to the following output: The set has 3 elements - - - - Evaluates to "true" if all elements of the second set are in the first, and at least - one element of the first is not in the second. - - The potential superset. - The set to test against. - - True if set1 is a proper superset of set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a proper superset of {set2}? {Set.isProperSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a proper superset of set [1; 2; 3; 4]? false - - - - Evaluates to "true" if all elements of the second set are in the first. - - The potential superset. - The set to test against. - - True if set1 is a superset of set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a superset of {set2}? {Set.isSuperset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a superset of set [1; 2; 3; 4]? false - - - - Evaluates to "true" if all elements of the first set are in the second, and at least - one element of the second is not in the first. - - The potential subset. - The set to test against. - - True if set1 is a proper subset of set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a proper subset of {set2}? {Set.isProperSubset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a proper subset of set [1; 2; 3; 4]? true - - - - Evaluates to "true" if all elements of the first set are in the second - - The potential subset. - The set to test against. - - True if set1 is a subset of set2. - - - - let set1 = Set.empty.Add(1).Add(2).Add(3) - let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4) - printfn $"Is {set1} a subset of {set2}? {Set.isSubset set1 set2}" - - The sample evaluates to the following output: Is set [1; 2; 3] a subset of set [1; 2; 3; 4]? true - - - - Evaluates to "true" if the given element is in the given set. - - The element to test. - The input set. - - True if element is in set. - - - - let set = Set.empty.Add(2).Add(3) - printfn $"Does the set contain 1? {set.Contains(1))}" - - The sample evaluates to the following output: Does the set contain 1? false - - - - Returns a new set with an element added to the set. No exception is raised if - the set already contains the given element. - - The value to add. - The input set. - - A new set containing value. - - - - let set = Set.empty.Add(1).Add(1).Add(2) - printfn $"The new set is: {set}" - - The sample evaluates to the following output: The new set is: set [1; 2] - - - - The set containing the given element. - - The value for the set to contain. - - The set containing value. - - - - Set.singleton 7 - - Evaluates to set [ 7 ]. - - - - The empty set for the type 'T. - - - - Set.empty<int> - - Evaluates to set [ ]. - - - - Contains operations for working with values of type . - - - Returns a representing an F# tuple type with the given element types - - Runtime assembly containing System.Tuple definitions. - An array of types for the tuple elements. - - The type representing the tuple containing the input elements. - - - - - Returns a representing an F# tuple type with the given element types - - An array of types for the tuple elements. - - The type representing the tuple containing the input elements. - - - - - Returns a representing an F# struct tuple type with the given element types - - An array of types for the tuple elements. - - The type representing the struct tuple containing the input elements. - - - - - Returns a representing an F# struct tuple type with the given element types - - Runtime assembly containing System.ValueTuple definitions. - An array of types for the tuple elements. - - The type representing the struct tuple containing the input elements. - - - - - Returns a representing the F# function type with the given domain and range - - The input type of the function. - The output type of the function. - - The function type with the given domain and range. - - - - - Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type - - The type to check. - Optional binding flags. - - True if the type check succeeds. - - - - - Return true if the typ is a representation of an F# tuple type - - The type to check. - - True if the type check succeeds. - - - - - Return true if the typ is a representation of an F# record type - - The type to check. - Optional binding flags. - - True if the type check succeeds. - - - - - Return true if the typ is a value corresponding to the compiled form of an F# module - - The type to check. - - True if the type check succeeds. - - - - - 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 - - The type to check. - - True if the type check succeeds. - - - - - Returns true if the typ is a representation of an F# exception declaration - - The type to check. - Optional binding flags. - - True if the type check is an F# exception. - - - - - Gets the cases of a union type. - - Assumes the given type is a union type. If not, is raised during pre-computation. - - The input union type. - Optional binding flags. - - Thrown when the input type is not a union type. - - An array of descriptions of the cases of the given union type. - - - - - Gets the tuple elements from the representation of an F# tuple type. - - The input tuple type. - - An array of the types contained in the given tuple type. - - - - - Reads all the fields from a record value, in declaration order - - Assumes the given input is a record value. If not, is raised. - - The input record type. - Optional binding flags. - - An array of descriptions of the properties of the record type. - - - - - Gets the domain and range types from an F# function type or from the runtime type of a closure implementing an F# type - - The input function type. - - A tuple of the domain and range types of the input function. - - - - - Reads all the fields from an F# exception declaration, in declaration order - - Assumes exceptionType is an exception representation type. If not, is raised. - - The exception type to read. - Optional binding flags. - - Thrown if the given type is not an exception. - - An array containing the PropertyInfo of each field in the exception. - - - - - 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, 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. - - The type of union to optimize reading. - Optional binding flags. - - An optimized function to read the tags of the given union type. - - - - - Precompute a property or static method for reading an integer representing the case tag of a union type. - - The type of union to read. - Optional binding flags. - - The description of the union case reader. - - - - - 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 - - The description of the union case to read. - Optional binding flags. - - A function to for reading the fields of the given union case. - - - - - A method that constructs objects of the given case - - The description of the union case. - Optional binding flags. - - The description of the constructor of the given union case. - - - - - Precompute a function for constructing a discriminated union value for a particular union case. - - The description of the union case. - Optional binding flags. - - A function for constructing values of the given union case. - - - - - Precompute a function for reading the values of a particular tuple type - - Assumes the given type is a TupleType. - If not, is raised during pre-computation. - - The tuple type to read. - - Thrown when the given type is not a tuple type. - - A function to read values of the given tuple type. - - - - - Gets information that indicates how to read a field of a tuple - - The input tuple type. - The index of the tuple element to describe. - - The description of the tuple element and an optional type and index if the tuple is big. - - - - - Gets a method that constructs objects of the given tuple type. - For small tuples, no additional type 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. - - The input tuple type. - - The description of the tuple type constructor and an optional extra type - for large tuples. - - - - - Precompute a function for reading the values of a particular tuple type - - Assumes the given type is a TupleType. - If not, is raised during pre-computation. - - The type of tuple to read. - - Thrown when the given type is not a tuple type. - - A function to read a particular tuple type. - - - - - 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, 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. - - The type of record to read. - Optional binding flags. - - Thrown when the input type is not a record type. - - An optimized reader for the given record 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, 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. - - The PropertyInfo of the field to read. - - Thrown when the input type is not a record type. - - A function to read the specified field from the record. - - - - - Get a ConstructorInfo for a record type - - The record type. - Optional binding flags. - - A ConstructorInfo for the given record type. - - - - - Precompute a function for constructing a record value. - - Assumes the given type is a RecordType. - If not, is raised during pre-computation. - - The type of record to construct. - Optional binding flags. - - Thrown when the input type is not a record type. - - A function to construct records of the given type. - - - - - Create a union case value. - - The description of the union case to create. - The array of arguments to construct the given case. - Optional binding flags. - - The constructed union case. - - - - - Creates an instance of a tuple type - - Assumes at least one element is given. If not, is raised. - - The array of tuple fields. - The tuple type to create. - - Thrown if no elements are given. - - An instance of the tuple type with the given elements. - - - - - Creates an instance of a record type. - - Assumes the given input is a record type. - - The type of record to make. - The array of values to initialize the record. - Optional binding flags for the record. - - Thrown when the input type is not a record type. - - The created record. - - - - - Builds a typed function from object from a dynamic function implementation - - The function type of the implementation. - The untyped lambda of the function implementation. - - A typed function from the given dynamic implementation. - - - - - Identify the union case and its fields for an object - - Assumes the given input is a union case value. If not, 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'. - The input union case. - The union type containing the value. - Optional binding flags. - - Thrown when the input type is not a union case value. - - The description of the union case and its fields. - - - - - Reads all fields from a tuple. - - Assumes the given input is a tuple value. If not, is raised. - - The input tuple. - - Thrown when the input is not a tuple value. - - An array of the fields from the given tuple. - - - - - Reads a field from a tuple value. - - Assumes the given input is a tuple value. If not, is raised. - - The input tuple. - The index of the field to read. - - The value of the field. - - - - - Reads all the fields from a record value. - - Assumes the given input is a record value. If not, is raised. - The record object. - Optional binding flags for the record. - - Thrown when the input type is not a record type. - - The array of fields from the record. - - - - - Reads a field from a record value. - - Assumes the given input is a record value. If not, is raised. - - The record object. - The PropertyInfo describing the field to read. - - Thrown when the input is not a record value. - - The field from the record. - - - - - Reads 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, is raised. - - The exception instance. - Optional binding flags. - - Thrown when the input type is not an F# exception. - - The fields from the given exception. - - - - - Contains operations associated with constructing and analyzing values associated with F# types - such as records, unions and tuples. - - - The integer tag for the case. - - - - type CoinToss = Heads | Tails - - typeof<CoinToss> - |> FSharpType.GetUnionCases - |> Array.map (fun x -> $"{x.Name} has tag {x.Tag}") - - Evaluates to [|"Heads has tag 0"; "Tails has tag 1"|] - - - - The name of the case. - - - - type Weather = Rainy | Sunny - - typeof<Weather> - |> FSharpType.GetUnionCases - |> Array.map (fun x -> x.Name) - - Evaluates to [|"Rainy", "Sunny"|] - - - - The type in which the case occurs. - - - - type Weather = Rainy | Sunny - - let rainy = - typeof<Weather> - |> FSharpType.GetUnionCases - |> Array.head - - rainy.DeclaringType - - Evaluates to a value of type System.Type - that holds type information for Weather. - - - - The fields associated with the case, represented by a PropertyInfo. - The fields associated with the case. - - - - type Shape = - | Rectangle of width : float * length : float - | Circle of radius : float - | Prism of width : float * float * height : float - - typeof<Shape> - |> FSharpType.GetUnionCases - |> Array.map (fun unionCase -> - unionCase.GetFields() - |> Array.map (fun fieldInfo -> - fieldInfo.Name, - fieldInfo.PropertyType.Name)) - - Evaluates to - - [|[|("width", "Double"); ("length", "Double")|]; - [|("radius", "Double")|]; - [|("width", "Double"); ("Item2", "Double"); ("height", "Double")|]|] - - - - - Returns the custom attributes data associated with the case. - An list of custom attribute data items. - - - - type Signal(signal: string) = - inherit System.Attribute() - member this.Signal = signal - - type Answer = - | [<Signal("Thumbs up")>] Yes - | [<Signal("Thumbs down")>] No - - let answerYes = - typeof<Answer> - |> FSharpType.GetUnionCases - |> Array.find (fun x -> x.Name = "Yes") - - answerYes.GetCustomAttributesData() - - Evaluates to - - [|[FSI_0150+Signal("Thumbs up")] - {AttributeType = FSI_0150+Signal; - Constructor = Void .ctor(System.String); - ConstructorArguments = seq ["Thumbs up"]; - NamedArguments = seq [];}; - [Microsoft.FSharp.Core.CompilationMappingAttribute((Microsoft.FSharp.Core.SourceConstructFlags)8, (Int32)0)] - {AttributeType = Microsoft.FSharp.Core.CompilationMappingAttribute; - Constructor = Void .ctor(Microsoft.FSharp.Core.SourceConstructFlags, Int32); - ConstructorArguments = seq - [(Microsoft.FSharp.Core.SourceConstructFlags)8; - (Int32)0]; - NamedArguments = seq [];}|] - - - - - Returns the custom attributes associated with the case matching the given attribute type. - The type of attributes to return. - - An array of custom attributes. - - - - type Signal(signal: string) = - inherit System.Attribute() - member this.Signal = signal - - type Answer = - | [<Signal("Thumbs up")>] Yes - | [<Signal("Thumbs down")>] No - - typeof<Answer> - |> FSharpType.GetUnionCases - |> Array.map (fun x -> x.GetCustomAttributes(typeof<Signal>)) - - Evaluates to - - [|[|FSI_0147+Signal {Signal = "Thumbs up"; - TypeId = FSI_0147+Signal;}|]; - [|FSI_0147+Signal {Signal = "Thumbs down"; - TypeId = FSI_0147+Signal;}|]|] - - - - - Returns the custom attributes associated with the case. - An array of custom attributes. - - - - type Weather = - | Rainy - | Sunny - - typeof<Weather> - |> FSharpType.GetUnionCases - |> Array.map (fun x -> x.GetCustomAttributes()) - - Evaluates to - - [|[|Microsoft.FSharp.Core.CompilationMappingAttribute - {ResourceName = null; - SequenceNumber = 0; - SourceConstructFlags = UnionCase; - TypeDefinitions = null; - TypeId = Microsoft.FSharp.Core.CompilationMappingAttribute; - VariantNumber = 0;}|]; - [|Microsoft.FSharp.Core.CompilationMappingAttribute - {ResourceName = null; - SequenceNumber = 1; - SourceConstructFlags = UnionCase; - TypeDefinitions = null; - TypeId = Microsoft.FSharp.Core.CompilationMappingAttribute; - VariantNumber = 0;}|]|] - - - - - Represents a case of a discriminated union type - - - Library functionality for accessing additional information about F# types and F# values at - runtime, augmenting that available through System.Reflection. - - - - Returns true if the exceptionType is a representation of an F# exception declaration - - The type to check. - Optional flag that denotes accessibility of the private representation. - - True if the type check is an F# exception. - - - - - Reads all the fields from an F# exception declaration, in declaration order - - Assumes exceptionType is an exception representation type. If not, is raised. - - The exception type to read. - Optional flag that denotes accessibility of the private representation. - - Thrown if the given type is not an exception. - - An array containing the PropertyInfo of each field in the exception. - - - - - Returns true if the typ is a representation of an F# union type or the runtime type of a value of that type - - The type to check. - Optional flag that denotes accessibility of the private representation. - - True if the type check succeeds. - - - - - Return true if the typ is a representation of an F# record type - - The type to check. - Optional flag that denotes accessibility of the private representation. - - True if the type check succeeds. - - - - - Gets the cases of a union type. - - Assumes the given type is a union type. If not, is raised during pre-computation. - - The input union type. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a union type. - - An array of descriptions of the cases of the given union type. - - - - - Reads all the fields from a record value, in declaration order - - Assumes the given input is a record value. If not, is raised. - - The input record type. - Optional flag that denotes accessibility of the private representation. - - An array of descriptions of the properties of the record type. - - - - - Reads 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, is raised. - - The exception instance. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not an F# exception. - - The fields from the given exception. - - - - - A method that constructs objects of the given case - - The description of the union case. - Optional flag that denotes accessibility of the private representation. - - The description of the constructor of the given union case. - - - - - Precompute a function for constructing a discriminated union value for a particular union case. - - The description of the union case. - Optional flag that denotes accessibility of the private representation. - - A function for constructing values of the given union case. - - - - - 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 - - The description of the union case to read. - Optional flag that denotes accessibility of the private representation. - - A function to for reading the fields of the given union case. - - - - - Precompute a property or static method for reading an integer representing the case tag of a union type. - - The type of union to read. - Optional flag that denotes accessibility of the private representation. - - The description of the union case reader. - - - - - Assumes the given type is a union type. - If not, 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. - - The type of union to optimize reading. - Optional flag that denotes accessibility of the private representation. - - An optimized function to read the tags of the given union type. - - - - - Identify the union case and its fields for an object - - Assumes the given input is a union case value. If not, 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'. - - The input union case. - The union type containing the value. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a union case value. - - The description of the union case and its fields. - - - - - Create a union case value. - - The description of the union case to create. - The array of arguments to construct the given case. - Optional flag that denotes accessibility of the private representation. - - The constructed union case. - - - - - Get a ConstructorInfo for a record type - - The record type. - Optional flag that denotes accessibility of the private representation. - - A ConstructorInfo for the given record type. - - - - - Precompute a function for constructing a record value. - - Assumes the given type is a RecordType. - If not, is raised during pre-computation. - - The type of record to construct. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a record type. - - A function to construct records of the given type. - - - - - 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, 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. - - The type of record to read. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a record type. - - An optimized reader for the given record type. - - - - - Reads all the fields from a record value. - - Assumes the given input is a record value. If not, is raised. - - The record object. - Optional flag that denotes accessibility of the private representation. - - Thrown when the input type is not a record type. - - The array of fields from the record. - - - - - Creates an instance of a record type. - - Assumes the given input is a record type. - - The type of record to make. - The array of values to initialize the record. - Optional flags that denotes accessibility of the private representation. - - Thrown when the input type is not a record type. - - The created record. - - - - - Defines further accessing additional information about F# types and F# values at runtime. - - - - 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 evaluation of IEnumerable objects - to a small, finite depth, as determined by the printing parameters. - This may lead to additional computation being performed during printing. - - - - - Data representing structured layouts of terms. - - - - - 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 Layout module. any_to_string and output_any are - built using any_to_layout with default format options. - - - - - For limiting 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. - - - - - See tagL - - - - - Layout like an F# list. - - - - - Layout like an F# option. - - - - - Layout list vertically. - - - - - Layout two vertically. - - - - - Form tuple of layouts. - - - - - Wrap braces around layout. - - - - - Wrap square brackets around layout. - - - - - Wrap round brackets around Layout. - - - - - Join layouts into a list separated using the given Layout. - - - - - Join layouts into a semi-colon separated list. - - - - - Join layouts into a space separated list. - - - - - Join layouts into a comma separated list. - - - - - Join broken with ident=4 - - - - - Join broken with ident=3 - - - - - Join broken with ident=2 - - - - - Join broken with ident=1 - - - - - Join broken with ident=0 - - - - - optional break, indent=4 - - - - - optional break, indent=3 - - - - - Join, possible break with indent=2 - - - - - Join, possible break with indent=1 - - - - - Join, possible break with indent=0 - - - - - Join, unbreakable. - - - - - An string which is left parenthesis (no space on the right). - - - - - An string which is right parenthesis (no space on the left). - - - - - An string which requires no spaces either side. - - - - - An string leaf - - - - - 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. - - - - - Is it the empty layout? - - - - - The empty layout - - - - - 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. - - - - Gets the raw expression associated with this type-carrying expression - - - - open FSharp.Quotations - - let expr1 = <@ 1 + 1 @> - - expr1.Raw - - Evaluates to the same quotation as <@ expr1 @> except with the weaker type Expr instead of Expr<int>. - - - - Type-carrying quoted expressions. Expressions are generated either - by quotations in source text or programatically - - - Returns type of an expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let sampleQuotation = <@ 1 + 1 @> - - sampleQuotation.Type - - Evaluates to typeof<int>. - - - - Returns the custom attributes of an expression. For quotations deriving from quotation literals this may include the source location of the literal. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let sampleQuotation = <@ 1 + 1 @> - - sampleQuotation.CustomAttributes - - Evaluates to a list of expressions containing one custom attribute for the source location of the quotation literal. - - - - Builds an expression that represents a value and its associated reflected definition as a quotation - - The untyped object. - The type of the object. - The definition of the value being quoted. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.WithValue(box 1, typeof<int>, <@ 2 - 1 @>) - - Evaluates to a quotation that displays as WithValue (1, Call (None, op_Subtraction, [Value (2), Value (1)])). - - - - Builds an expression that represents a value and its associated reflected definition as a quotation - - The value being quoted. - The definition of the value being quoted. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.WithValue(1, <@ 2 - 1 @>) - - Evaluates to a quotation that displays as WithValue (1, Call (None, op_Subtraction, [Value (2), Value (1)])). - - - - Builds an expression that represents a while loop - - The predicate to control the loop iteration. - The body of the while loop. - - The resulting expression. - - - - open FSharp.Quotations - - let guardExpr = <@ true @> - let bodyExpr = <@ () @> - - Expr.WhileLoop(guardExpr, bodyExpr) - - Evaluates to a quotation with the same structure as <@ while true do () @>. - - - - Builds an expression that represents setting a mutable variable - - The input variable. - The value to set. - - The resulting expression. - - - - open FSharp.Quotations - - let vVar = Var("v", typeof<int>, isMutable=true) - - Expr.VarSet(vVar, <@ 5 @>) - - Evaluates to a quotation displayed as VarSet (v, Value (5)). - - - - Builds an expression that represents a variable - - The input variable. - - The resulting expression. - - - - open FSharp.Quotations - - let vVar = Var("v", typeof<int>) - - Expr.Var(vVar) - - Evaluates to a quotation displayed as v. - - - - Builds an expression that represents a constant value of a particular type, arising from a variable of the given name - - The untyped object. - The type of the object. - The name of the variable. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.ValueWithName(box 1, typeof<int>, "name") - - Evaluates to a quotation with the same structure as <@ 1 @> and associated information that the name of the value is "name". - - - - Builds an expression that represents a constant value, arising from a variable of the given name - - The typed value. - The name of the variable. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.ValueWithName(1, "name") - - Evaluates to a quotation with the same structure as <@ 1 @> and associated information that the name of the value is "name". - - - - Builds an expression that represents a constant value - - The typed value. - - - - open FSharp.Quotations - - Expr.Value(1) - - Evaluates to a quotation with the same structure as <@ 1 @>. - - - - Builds an expression that represents a constant value of a particular type - - The untyped object. - The type of the object. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.Value(box 1, typeof<int>) - - Evaluates to a quotation with the same structure as <@ 1 @>. - - - - Builds an expression that represents a test of a value is of a particular union case - - The expression to test. - The description of the union case. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Reflection - - let ucCons = FSharpType.GetUnionCases(typeof<int list>)[1] - - Expr.UnionCaseTest(<@ [11] @>, ucCons) - - Evaluates to a quotation that displays as UnionCaseTest (NewUnionCase (Cons, Value (11), NewUnionCase (Empty)), Cons). - - - - Builds an expression that represents a type test. - - The expression to test. - The target type. - - The resulting expression. - - - - open FSharp.Quotations - - let obj = box 1 - - Expr.TypeTest( <@ obj @>, typeof<int>) - - Evaluates to quotation that displays as TypeTest (Int32, PropertyGet (None, obj, [])). - - - - Builds an expression that represents getting a field of a tuple - - The input tuple. - The index of the tuple element to get. - - The resulting expression. - - - - open FSharp.Quotations - - let tupExpr = <@ (1, 2, 3) @> - - Expr.TupleGet(tupExpr, 1) - - Evaluates to quotation that displays as TupleGet (NewTuple (Value (1), Value (2), Value (3)), 1). - - - - Builds an expression that represents a try/with construct for exception filtering and catching. - - The body of the try expression. - - - The variable to bind to a caught exception. - The expression evaluated when an exception is caught. - - The resulting expression. - - - - open System - open FSharp.Quotations - - let exnVar = Var("exn", typeof<exn>) - - Expr.TryWith(<@ 1+1 @>, exnVar, <@ 1 @>, exnVar, <@ 2+2 @>) - - Evaluates to a quotation with the same structure as <@ try 1+1 with exn -> 2+2 @>. - - - - 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. - - The description of the method to find. - - The reflection definition or None if a match could not be found. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - [<ReflectedDefinition>] - let f x = x + 1 - - let methInfo = - match <@ f 1 @> with - | Call(_, mi, _) -> mi - | _ -> failwith "call expected" - - Expr.TryGetReflectedDefinition(methInfo) - - Evaluates to a quotation with the same structure as <@ fun x -> x + 1 @>, which is the implementation of the - method f. - - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - [<ReflectedDefinition>] - module Methods = - let f x = (x, x) - - let methInfoGeneric = - match <@ Methods.f (1, 2) @> with - | Call(_, mi, _) -> mi.GetGenericMethodDefinition() - | _ -> failwith "call expected" - - let methInfoAtString = methInfoGeneric.MakeGenericMethod(typeof<string>) - - Expr.TryGetReflectedDefinition(methInfoAtString) - - Evaluates to a quotation with the same structure as <@ fun (x: string) -> (x, x) @>, which is the implementation of the - generic method f instanatiated at type string. - - - - Builds an expression that represents a try/finally construct - - The body of the try expression. - The final part of the expression to be evaluated. - - The resulting expression. - - - - open System - open FSharp.Quotations - - Expr.TryFinally(<@ 1+1 @>, <@ Console.WriteLine("finally") @>) - - Evaluates to a quotation with the same structure as <@ try 1+1 finally Console.WriteLine("finally") @>. - - - - Format the expression as a string - - Indicates if method, property, constructor and type objects should be printed in detail. If false, these are abbreviated to their name. - - The formatted string. - - - - open FSharp.Quotations - - let expr1 = <@ 1 + 1 @> - - expr1.ToString(true) - - Evaluates "Call (None, Int32 op_Addition[Int32,Int32,Int32](Int32, Int32),[Value (1), Value (1)])". - - - - Substitutes 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. - - The function to map variables into expressions. - - The expression with the given substitutions. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let sampleQuotation = <@ fun v -> v * v @> - - let v, body = - match sampleQuotation with - | Lambda(v, body) -> (v, body) - | _ -> failwith "unreachable" - - body.Substitute(function v2 when v = v2 -> Some <@ 1 + 1 @> | _ -> None) - - Evaluates to <@ (1 + 1) * (1 + 1)>. - - - - Builds an expression that represents the sequential execution of one expression followed by another - - The first expression. - The second expression. - - The resulting expression. - - - - open System - open FSharp.Quotations - - Expr.Sequential(<@ Console.WriteLine("a") @>, <@ Console.WriteLine("b") @>) - - Evaluates to a quotation with the same structure as <@ Console.WriteLine("a"); Console.WriteLine("b") @>. - - - - Permits interactive environments such as F# Interactive - to explicitly register new pickled resources that represent persisted - top level definitions. - - The assembly associated with the resource. - The unique name for the resources being added. - The type definitions referenced. - The serialized resource to register with the environment. - - - - Permits interactive environments such as F# Interactive - to explicitly register new pickled resources that represent persisted - top level definitions. - - The assembly associated with the resource. - The unique name for the resources being added. - The serialized resource to register with the environment. - - - - Builds an expression that represents a nested typed quotation literal - - The expression being quoted. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.QuoteTyped(<@ 1 @>) - - Evaluates to a quotation with the same structure as <@ <@ 1 @> @>. - - - - Builds an expression that represents a nested raw quotation literal - - The expression being quoted. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.QuoteRaw(<@ 1 @>) - - Evaluates to a quotation with the same structure as <@ <@ 1 @> @>. - - - - Builds an expression that represents a nested typed or raw quotation literal - - The expression being quoted. - - The resulting expression. - - - Builds an expression that represents writing to a static property - - The description of the property. - The value to set. - List of indices for the property if it is an indexed property. - - The resulting expression. - - - - open System - open System.Collections.Generic - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let propInfo = - match <@ Console.BackgroundColor <- ConsoleColor.Red @> with - | PropertySet(None, pi, _, _) -> pi - | _ -> failwith "property get expected" - - Expr.PropertySet(propInfo, <@ ConsoleColor.Blue @>) - - Evaluates to a quotation with the same structure as <@ Console.BackgroundColor <- ConsoleColor.Blue @>. - - - - Builds an expression that represents writing to a property of an object - - The input object. - The description of the property. - The value to set. - List of indices for the property if it is an indexed property. - - The resulting expression. - - - - open System - open System.Collections.Generic - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let propInfo = - match <@ (new List<int>()).Capacity @> with - | PropertyGet(Some _, pi, _) -> pi - | _ -> failwith "property get expected" - - let objExpr = <@ (new List<int>()) @> - - Expr.PropertySet(objExpr, propInfo, <@ 6 @>) - - Evaluates to a quotation with the same structure as <@ (new List<int>()).Capacity <- 6 @>. - - - - Builds an expression that represents reading a static property - - The description of the property. - List of indices for the property if it is an indexed property. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let propInfo = - match <@ Console.Out @> with - | PropertyGet(None, pi, _) -> pi - | _ -> failwith "property get expected" - - Expr.PropertyGet(propInfo) - - Evaluates to a quotation with the same structure as <@ Console.Out @>. - - - - Builds an expression that represents reading a property of an object - - The input object. - The description of the property. - List of indices for the property if it is an indexed property. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let propInfo = - match <@ "a".Length @> with - | PropertyGet(Some _, pi, _) -> pi - | _ -> failwith "property get expected" - - let objExpr = <@ "bb" @> - - Expr.PropertyGet(objExpr, propInfo) - - Evaluates to a quotation with the same structure as <@ "bb".Length @>. - - - - Builds an expression that represents the creation of a union case value - - The description of the union case. - The list of arguments for the case. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Reflection - - let ucCons = FSharpType.GetUnionCases(typeof<int list>)[1] - - Expr.NewUnionCase(ucCons, [ <@ 10 @>; <@ [11] @> ]) - - Evaluates to a quotation with the same structure as <@ 10 :: [11] @>. - - - - Builds an expression that represents the creation of an F# tuple value - - The list of elements of the tuple. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.NewTuple([ <@ 1 @>; <@ "a" @> ]) - - Evaluates to a quotation with the same structure as <@ (1, "a") @>. - - - - Builds an expression that represents the creation of an F# tuple value - - The list of elements of the tuple. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.NewStructTuple( [ <@ 1 @>; <@ "a" @> ]) - - Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. - - - - Builds an expression that represents the creation of an F# tuple value - - Runtime assembly containing System.ValueTuple definitions. - The list of elements of the tuple. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.NewStructTuple(typeof<struct (int * int)>.Assembly, [ <@ 1 @>; <@ "a" @> ]) - - Evaluates to a quotation with the same structure as <@ struct (1, "a") @>. - - - - Builds record-construction expressions - - The type of record. - The list of elements of the record. - - The resulting expression. - - - - open FSharp.Quotations - - type R = { Y: int; X: string } - - Expr.NewRecord(typeof<R>, [ <@ 1 @>; <@ "a" @> ]) - - Evaluates to a quotation with the same structure as <@ { Y = 1; X = "a" } @>. - - - - Builds an expression that represents the invocation of an object constructor - - The description of the constructor. - The list of arguments to the constructor. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let ctorInfo = - match <@ new System.DateTime(100L) @> with - | NewObject(ci, _) -> ci - | _ -> failwith "call expected" - - let argExpr = <@ 100000L @> - - Expr.NewObject(ctorInfo, [argExpr]) - - Evaluates to a quotation with the same structure as <@ NewObject (DateTime, Value (100000L)) @>. - - - - Builds an expression that represents the creation of a delegate value for the given type - - The type of delegate. - The parameters for the delegate. - The body of the function. - - The resulting expression. - - - - open System - open FSharp.Quotations - - let vVar = Var("v", typeof<int>) - let vExpr = Expr.Var(vVar) - - Expr.NewDelegate(typeof<Func<int,int>>, [vVar], vExpr) - - Evaluates to a quotation with the same structure as <@ new System.Func<int, int>(fun v -> v) @>. - - - - Builds an expression that represents the creation of an array value initialized with the given elements - - The type for the elements of the array. - The list of elements of the array. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.NewArray(typeof<int>, [ <@ 1 @>; <@ 2 @> ]) - - Evaluates to a quotation with the same structure as <@ [| 1; 2 |] @>. - - - - Builds recursive expressions associated with 'let rec' constructs - - The list of bindings for the let expression. - The sub-expression where the bindings are in scope. - - The resulting expression. - - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let fVar = Var("f", typeof<int -> int>) - let gVar = Var("v", typeof<int -> int>) - let fExpr = Expr.Var(fVar) - let gExpr = Expr.Var(gVar) - let fImplExpr = <@ fun x -> (%%gExpr : int -> int) (x - 1) + 1 @> - let gImplExpr = <@ fun x -> if x > 0 then (%%fExpr : int -> int) (x - 1) else 0 @> - let bodyExpr = <@ (%%gExpr : int -> int) 10 @> - - Expr.LetRecursive([(fVar, fImplExpr); (gVar, gImplExpr)], bodyExpr) - - Evaluates to a quotation with the same structure as <@ let rec f x = g (x-1) + 1 and g x = if x > 0 then f (x - 1) else 0 in g 10 @>. - - - - Builds expressions associated with 'let' constructs - - The variable in the let expression. - The expression bound to the variable. - The sub-expression where the binding is in scope. - - The resulting expression. - - - - open FSharp.Quotations - - let vVar = Var("v", typeof<int>) - let rhsExpr = <@ 6 @> - let vExpr = Expr.Var(vVar) - - Expr.Let(vVar, rhsExpr, vExpr) - - Evaluates to a quotation with the same structure as <@ let v = 6 in v @>. - - - - Builds an expression that represents the construction of an F# function value - - The parameter to the function. - The body of the function. - - The resulting expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let vVar = Var("v", typeof<int>) - let vExpr = Expr.Var(vVar) - - Expr.Lambda(vVar, vExpr) - - Evaluates to Lambda (v, v). - - - - Builds 'if ... then ... else' expressions. - - The condition expression. - The then sub-expression. - The else sub-expression. - - The resulting expression. - - - - open FSharp.Quotations - - let guardExpr = <@ 1 > 3 @> - let thenExpr = <@ 6 @> - let elseExpr = <@ 7 @> - - Expr.IfThenElse(guardExpr, thenExpr, elseExpr) - - Evaluates to a quotation with the same structure as <@ if 1 > 3 then 6 else 7 @>. - - - - Fetches or creates 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 explicit or inferred type parameter - - The variable name. - - The created of fetched typed global variable. - - - - open FSharp.Quotations - - let expr1 = Expr.GlobalVar<int>("x") - let expr2 = Expr.GlobalVar<int>("x") - - Evaluates expr1 and expr2 to identical quotations. - - - - Gets the free expression variables of an expression as a list. - A sequence of the free variables in the expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let sampleQuotation = <@ fun v -> v * v @> - - let v, body = - match sampleQuotation with - | Lambda(v, body) -> (v, body) - | _ -> failwith "unreachable" - - body.GetFreeVars() - - Evaluates to a set containing the single variable for v - - - - Builds a 'for i = ... to ... do ...' expression that represent loops over integer ranges - - The sub-expression declaring the loop variable. - The sub-expression setting the initial value of the loop variable. - The sub-expression declaring the final value of the loop variable. - The sub-expression representing the body of the loop. - - The resulting expression. - - - - open FSharp.Quotations - - let loopVariable = Var("x", typeof<int>) - let startExpr = <@ 6 @> - let endExpr = <@ 7 @> - let body = <@ System.Console.WriteLine("hello") @> - - Expr.ForIntegerRangeLoop(loopVariable, startExpr, endExpr, body) - - Evaluates to a quotation with the same structure as <@ if 1 > 3 then 6 else 7 @>. - - - - Builds an expression that represents writing to a field of an object - - The input object. - The description of the field to write to. - The value to set to the field. - - The resulting expression. - - Create an expression setting a reference cell via the public backing field: - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let fieldInfo = typeof<int ref>.GetField("contents@") - let refValue = ref 3 - let refExpr = <@ refValue @> - let valueExpr = <@ 6 @> - - Expr.FieldSet(refExpr, fieldInfo, valueExpr) - - Evaluates to FieldSet (Some (PropertyGet (None, refValue, [])), contents@, Value (6)). - Note that for technical reasons the quotation <@ refValue.contents <- 6 @> evaluates to a slightly different quotation - accessing the contents field via a property. - - - - Builds an expression that represents writing to a static field - - The description of the field to write to. - The value to the set to the field. - - The resulting expression. - - Settable public static fields are rare in F# and .NET libraries, so examples of using this method are uncommon. - - - Builds an expression that represents the access of a field of an object - - The input object. - The description of the field to access. - - The resulting expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let fieldInfo = typeof<int ref>.GetField("contents@") - let refValue = ref 3 - let refExpr = <@ refValue @> - - Expr.FieldGet(refExpr, fieldInfo) - - Evaluates to FieldGet (Some (PropertyGet (None, refValue, [])), contents@). - Note that for technical reasons the quotation <@ refValue.contents @> evaluates to a different quotation - accessing the contents field via a property. - - - - Builds an expression that represents the access of a static field - - The description of the field to access. - - The resulting expression. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let fieldInfo = typeof<System.DayOfWeek>.GetField("Monday") - - Expr.FieldGet(fieldInfo) - - Evaluates to FieldGet (None, Monday). Note that for technical reasons the quotation <@ System.DayOfWeek.Monday @> evaluates to a different quotation containing a constant enum value Value (Monday). - - - - This function is called automatically when quotation syntax (<@ @>) and other sources of - quotations are used. - - A type in the assembly where the quotation occurs. - The type definitions referenced. - The spliced types, to replace references to type variables. - The spliced expressions to replace references to spliced expressions. - The serialized form of the quoted expression. - - The resulting expression. - - - This function is called automatically when quotation syntax (<@ @>) and other sources of - quotations are used. - - A type in the assembly where the quotation occurs. - The spliced types, to replace references to type variables. - The spliced expressions to replace references to spliced expressions. - The serialized form of the quoted expression. - - The resulting expression. - - - Builds an expression that represents the invocation of a default object constructor - - The type on which the constructor is invoked. - - The resulting expression. - - - - open FSharp.Quotations - - Expr.DefaultValue(typeof<int>) - - Evaluates to the quotation DefaultValue (Int32). - - - - Builds an expression that represents the coercion of an expression to a type - - The expression to coerce. - The target type. - - The resulting expression. - - - - open FSharp.Quotations - - let expr = <@ box "3" @> - - Expr.Coerce(expr, typeof<string>) - - Evaluates to a quotation with the same structure as <@ (fun x -> x + 1) 3 @>. - - - - Returns 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. - - The expression to cast. - - The resulting typed expression. - - - - open FSharp.Quotations - - let rawExpr = <@ 1 @> - - Expr.Cast<int>(rawExpr) - - Evaluates with type Expr<int>. - - - - Builds an expression that represents a call to an instance method associated with an object, potentially passing additional witness arguments - - The input object. - The description of the method to call. - The additional MethodInfo describing the method to call, accepting witnesses. - The list of witnesses to the method. - The list of arguments to the method. - - The resulting expression. - - See examples for Call and CallWithWitnesses - - - Builds an expression that represents a call to an static method or module-bound function, potentially passing additional witness arguments - - The MethodInfo describing the method to call. - The additional MethodInfo describing the method to call, accepting witnesses. - The list of witnesses to the method. - The list of arguments to the method. - - The resulting expression. - - In this example, we show how to use a witness to cosntruct an `op_Addition` call for a type that doesn't support addition directly: - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - // Get the entrypoint for inline addition that takes an explicit witness - let addMethInfoG, addMethInfoGW = - match <@ 1+1 @> with - | CallWithWitnesses(None, mi, miW, _, _) -> - mi.GetGenericMethodDefinition(), miW.GetGenericMethodDefinition() - | _ -> - failwith "call expected" - - // Make a non-standard witness for addition for a type C - - type C(value: int) = - member x.Value = value - - let witnessExpr = <@ (fun (x: C) (y: C) -> C(x.Value + y.Value)) @> - let argExpr1 = <@ C(4) @> - let argExpr2 = <@ C(5) @> - - // Instantiate the generic method at the right type - - let addMethInfo = addMethInfoG.MakeGenericMethod(typeof<C>, typeof<C>, typeof<C>) - let addMethInfoW = addMethInfoGW.MakeGenericMethod(typeof<C>, typeof<C>, typeof<C>) - - Expr.CallWithWitnesses(addMethInfo, addMethInfoW, [witnessExpr], [argExpr1; argExpr2]) - - Evaluates to a quotation with the same structure as <@ Call (None, op_Addition, [NewObject (C, Value (4)), NewObject (C, Value (5))]) @>. - - - - Builds an expression that represents a call to an instance method associated with an object - - The input object. - The description of the method to call. - The list of arguments to the method. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let objExpr, methInfo = - match <@ Console.Out.WriteLine("1") @> with - | Call(Some obj, mi, _) -> obj, mi - | _ -> failwith "call expected" - - let argExpr = <@ "Hello World" @> - - Expr.Call(objExpr, methInfo, [argExpr]) - - Evaluates to a quotation with the same structure as <@ Console.Out.WriteLine("Hello World") @>. - - - - Builds an expression that represents a call to an static method or module-bound function - - The MethodInfo describing the method to call. - The list of arguments to the method. - - The resulting expression. - - - - open System - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let methInfo = - match <@ Console.WriteLine("1") @> with - | Call(_, mi, _) -> mi - | _ -> failwith "call expected" - - let argExpr = <@ "Hello World" @> - - Expr.Call(methInfo, [argExpr]) - - Evaluates to a quotation with the same structure as <@ Console.WriteLine("Hello World") @>. - - - - Builds an expression that represents the application of a first class function value to multiple arguments - - The function to apply. - The list of lists of arguments to the function. - - The resulting expression. - - - - open FSharp.Quotations - - let funcExpr = <@ (fun (x, y) z -> x + y + z) @> - let curriedArgExprs = [[ <@ 1 @>; <@ 2 @> ]; [ <@ 3 @> ]] - - Expr.Applications(funcExpr, curriedArgExprs) - - Evaluates to a quotation with the same structure as <@ (fun (x, y) z -> x + y + z) (1,2) 3 @>. - - - - Builds an expression that represents the application of a first class function value to a single argument. - - The function to apply. - The argument to the function. - - The resulting expression. - - - - open FSharp.Quotations - - let funcExpr = <@ (fun x -> x + 1) @> - let argExpr = <@ 3 @> - - Expr.Application(funcExpr, argExpr) - - Evaluates to a quotation with the same structure as <@ (fun x -> x + 1) 3 @>. - - - - Builds an expression that represents setting the value held at a particular address. - - The target expression. - The value to set at the address. - - The resulting expression. - - - - open FSharp.Quotations - - let array = [| 1; 2; 3 |] - - let addrExpr = Expr.AddressOf(<@ array.[1] @>) - - Expr.AddressSet(addrExpr, <@ 4 @>) - - Evaluates to AddressSet (AddressOf (Call (None, GetArray, [PropertyGet (None, array, []), Value (1)])), Value (4)). - - - - Builds an expression that represents getting the address of a value. - - The target expression. - - The resulting expression. - - - - open FSharp.Quotations - - let array = [| 1; 2; 3 |] - - Expr.AddressOf(<@ array.[1] @>) - - Evaluates to AddressOf (Call (None, GetArray, [PropertyGet (None, array, []), Value (1)])). - - - - Quoted expressions annotated with System.Type values. - - - The type associated with the variable - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - match <@ fun v -> v @> with - | Lambda(v, body) -> v.Type - | _ -> failwith "unreachable" - - Evaluates to typeof<int> - - - - The declared name of the variable - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - match <@ fun v -> v @> with - | Lambda(v, body) -> v.Name - | _ -> failwith "unreachable" - - Evaluates to "v" - - - - Indicates if the variable represents a mutable storage location - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - match <@ fun v -> v @> with - | Lambda(v, body) -> v.IsMutable - | _ -> failwith "unreachable" - - Evaluates to false. - - - - Fetches or create a new variable with the given name and type from a global pool of shared variables - indexed by name and type - - The name of the variable. - The type associated with the variable. - - The retrieved or created variable. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let valueVar1 = Var.Global("value", typeof<int>) - let valueVar2 = Var.Global("value", typeof<int>) - - Evaluates both to valueVar1 and valueVar2 to the same variable from a global pool of shared variables. - - - - Creates a new variable with the given name, type and mutability - - The declared name of the variable. - The type associated with the variable. - Indicates if the variable represents a mutable storage location. Default is false. - - The created variable. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - - let valueVar = Var("value"), typeof<int>) - - Evaluates to a new quotation variable with the given name and type. - - - - Information at the binding site of a variable - - - Library functionality for F# quotations. - See also F# Code Quotations in the F# Language Guide. - - - - Re-build combination expressions. The first parameter should be an object - returned by the ShapeCombination case of the active pattern in this module. - - The input shape. - The list of arguments. - - The rebuilt expression. - - - - - An active pattern that performs a complete decomposition viewing the expression tree as a binding structure - - The input expression. - - The decomposed Var, Lambda, or ConstApp. - - - - - Active patterns for traversing, visiting, rebuilding and transforming expressions in a generic way - - - An active pattern to recognize property setters that have an associated ReflectedDefinition - - The description of the property. - - The expression of the method definition if found, or None. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - [<ReflectedDefinition>] - type C<'T>() = - member x.Count with set (v: int) = () - - let inpExpr = <@ C<int>().Count <- 3 @> - - let implExpr = - match inpExpr with - | PropertySet(Some _, PropertySetterWithReflectedDefinition implExpr, [], _valueExpr) -> implExpr - | _ -> failwith "unexpected" - - Evaluates implExpr to a quotation with the same structure as <@ fun (x: C<int>) (v: int) -> () @>, which is the implementation of the - setter for the property Count. Note that the correct generic instantaition has been applied to the implementation to reflect - the the type at the callsite. - - - - - An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition - - The description of the property. - - The expression of the method definition if found, or None. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - [<ReflectedDefinition>] - type C<'T>() = - member x.Identity = x - - let inpExpr = <@ C<int>().Identity @> - - let implExpr = - match inpExpr with - | PropertyGet(Some _, PropertyGetterWithReflectedDefinition implExpr, [ ]) -> implExpr - | _ -> failwith "unexpected" - - Evaluates implExpr to a quotation with the same structure as <@ fun (x: C<int>) () -> x @>, which is the implementation of the - property Identity. Note that the correct generic instantaition has been applied to the implementation to reflect - the the type at the callsite. - - - - - An active pattern to recognize methods that have an associated ReflectedDefinition - - The description of the method. - - The expression of the method definition if found, or None. - - - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - [<ReflectedDefinition>] - let f x = (x, x) - - let inpExpr = <@ f 4 @> - - let implExpr = - match inpExpr with - | Call(None, MethodWithReflectedDefinition implExpr, [ _argExpr ]) -> implExpr - | _ -> failwith "unexpected" - - Evaluates implExpr to a quotation with the same structure as <@ fun (x: int) -> (x, x) @>, which is the implementation of the - method f. Note that the correct generic instantaition has been applied to the implementation to reflect - the the type at the callsite. - - - - - A parameterized active pattern to recognize calls to a specified function or method. - The returned elements are the optional target object (present if the target is an - instance method), the generic type instantiation (non-empty if the target is a generic - instantiation), and the arguments to the function or method. - - The input template expression to specify the method to call. - - The optional target object (present if the target is an - instance method), the generic type instantiation (non-empty if the target is a generic - instantiation), and the arguments to the function or method. - - Match a specific call to Console.WriteLine taking one string argument: - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - let inpExpr = <@ Console.WriteLine("hello") @> - - match inpExpr with - | SpecificCall <@ Console.WriteLine("1") @> (None, [], [ argExpr ]) -> argExpr - | _ -> failwith "unexpected" - - Evaluates to a quotation with the same structure as <@ "hello" @>. - - - Calls to this active pattern can be partially applied to pre-evaluate some aspects of the matching. For example: - - open FSharp.Quotations - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - let (|ConsoleWriteLineOneArg|_|) = (|SpecificCall|_|) <@ Console.WriteLine("1") @> - - let inpExpr = <@ Console.WriteLine("hello") @> - - match inpExpr with - | ConsoleWriteLineOneArg (None, [], [ argExpr ]) -> argExpr - | _ -> failwith "unexpected" - - Evaluates to a quotation with the same structure as <@ "hello" @>. - - - - An active pattern to recognize constant decimal expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8.0M @> with - | Decimal v -> v - | _ -> failwith "unexpected" - - Evaluates to 8.0M. - - - - An active pattern to recognize constant unsigned int64 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8UL @> with - | UInt64 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8UL. - - - - An active pattern to recognize constant int64 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8L @> with - | Int64 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8L. - - - - An active pattern to recognize constant unsigned int32 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8u @> with - | UInt32 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8u. - - - - An active pattern to recognize constant int32 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8 @> with - | Int32 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8. - - - - An active pattern to recognize constant unsigned int16 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8us @> with - | UInt16 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8us. - - - - An active pattern to recognize constant int16 expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8s @> with - | Int16 v -> v - | _ -> failwith "unexpected" - - Evaluates to 8s. - - - - An active pattern to recognize constant byte expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8uy @> with - | Byte v -> v - | _ -> failwith "unexpected" - - Evaluates to 8uy. - - - - An active pattern to recognize constant signed byte expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 8y @> with - | SByte v -> v - | _ -> failwith "unexpected" - - Evaluates to 8y. - - - - An active pattern to recognize constant unicode character expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 'a' @> with - | Char v -> v - | _ -> failwith "unexpected" - - Evaluates to 'a'. - - - - An active pattern to recognize constant 64-bit floating point number expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 1.0 @> with - | Double v -> v - | _ -> failwith "unexpected" - - Evaluates to 1.0. - - - - An active pattern to recognize constant 32-bit floating point number expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ 1.0f @> with - | Single v -> v - | _ -> failwith "unexpected" - - Evaluates to 1.0f. - - - - An active pattern to recognize constant string expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ "a" @> with - | String v -> v - | _ -> failwith "unexpected" - - Evaluates to "a". - - - - An active pattern to recognize constant boolean expressions - - The input expression to match against. - - When successful, the pattern binds the constant value from the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ true @> with - | Bool v -> v - | _ -> failwith "unexpected" - - Evaluates to true. - - - - An active pattern to recognize () constant expressions - - The input expression to match against. - - When successful, the pattern does not bind any results - - - - open FSharp.Quotations.DerivedPatterns - - match <@ () @> with - | Unit v -> v - | _ -> failwith "unexpected" - - Evaluates to true. - - - - An active pattern to recognize expressions of the form a || b - - The input expression to match against. - - When successful, the pattern binds the left and right parts of the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ true || false @> with - | OrElse (a, b) -> (a, b) - | _ -> failwith "unexpected" - - Evaluates to <@ true @>, <@ false @>. - - - - An active pattern to recognize expressions of the form a && b - - The input expression to match against. - - When successful, the pattern binds the left and right parts of the input expression - - - - open FSharp.Quotations.DerivedPatterns - - match <@ true && false @> with - | AndAlso (a, b) -> (a, b) - | _ -> failwith "unexpected" - - Evaluates to <@ true @>, <@ false @>. - - - - An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value - - The input expression to match against. - - When successful, the pattern binds the function and curried arguments of the input expression - - - - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - match <@ (fun f -> f (1, 2) 3) @> with - | Lambda(_, Applications (f, curriedArgs)) -> - curriedArgs |> List.map (fun args -> args.Length) - | _ -> failwith "unexpected" - - Evaluates to [2; 1]. - - - - An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value - - The input expression to match against. - - When successful, the pattern binds the curried variables and body of the input expression - - - - open FSharp.Quotations.Patterns - open FSharp.Quotations.DerivedPatterns - - match <@ (fun (a1, a2) b -> ()) @> with - | Lambdas(curriedVars, _) -> - curriedVars |> List.map (List.map (fun arg -> arg.Name)) - | _ -> failwith "unexpected" - - Evaluates to [["a1"; "a2"]; ["b"]]. - - - - Contains a set of derived F# active patterns to analyze F# expression objects - - - An active pattern to recognize expressions that represent setting a mutable variable - - The input expression to match against. - - When successful, the pattern binds the variable and value expression of the input expression - - - - - An active pattern to recognize expressions that represent a variable - - The input expression to match against. - - When successful, the pattern binds the variable of the input expression - - - - - An active pattern to recognize expressions that are a value with an associated definition - - The input expression to match against. - - When successful, the pattern binds the boxed value, its static type and its definition - - - - - An active pattern to recognize expressions that represent a constant value - - The input expression to match against. - - When successful, the pattern binds the boxed value, its static type and its name - - - - - An active pattern to recognize expressions that represent a constant value. This also matches expressions matched by ValueWithName. - - The input expression to match against. - - When successful, the pattern binds the boxed value and its static type - - - - - An active pattern to recognize expressions that represent a test if a value is of a particular union case - - The input expression to match against. - - When successful, the pattern binds the expression and union case being tested - - - - - An active pattern to recognize expressions that represent a dynamic type test - - The input expression to match against. - - When successful, the pattern binds the expression and type being tested - - - - - An active pattern to recognize expressions that represent getting a tuple field - - The input expression to match against. - - When successful, the pattern binds the expression and tuple field being accessed - - - - - An active pattern to recognize expressions that represent a try/finally construct - - The input expression to match against. - - When successful, the pattern binds the body and handler parts of the try/finally expression - - - - - An active pattern to recognize expressions that represent a try/with construct for exception filtering and catching - - The input expression to match against. - - When successful, the pattern binds the body, exception variable, filter expression and catch expression of the input expression - - - - - An active pattern to recognize expressions that represent sequential execution of one expression followed by another - - The input expression to match against. - - When successful, the pattern binds the two sub-expressions of the input expression - - - - - An active pattern to recognize expressions that represent a nested typed quotation literal - - The input expression to match against. - - When successful, the pattern binds the nested quotation expression of the input expression - - - - - An active pattern to recognize expressions that represent a nested raw quotation literal - - The input expression to match against. - - When successful, the pattern binds the nested quotation expression of the input expression - - - - - An active pattern to recognize expressions that represent a nested quotation literal - - The input expression to match against. - - When successful, the pattern binds the nested quotation expression of the input expression - - - - - An active pattern to recognize expressions that represent setting a static or instance property, or a non-function value declared in a module - - The input expression to match against. - - When successful, the pattern binds the object, property, indexer arguments and setter value of the input expression - - - - - 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 - - The input expression to match against. - - When successful, the pattern binds the object, property and indexer arguments of the input expression - - - - - An active pattern to recognize expressions that represent construction of struct tuple values - - The input expression to match against. - - When successful, the pattern binds the element expressions of the input expression - - - - - An active pattern to recognize expressions that represent construction of tuple values - - The input expression to match against. - - When successful, the pattern binds the element expressions of the input expression - - - - - An active pattern to recognize expressions that represent construction of particular union case values - - The input expression to match against. - - When successful, the pattern binds the union case and field values of the input expression - - - - - An active pattern to recognize expressions that represent construction of record values - - The input expression to match against. - - When successful, the pattern binds the record type and field values of the input expression - - - - - An active pattern to recognize expressions that represent invocation of object constructors - - The input expression to match against. - - When successful, the pattern binds the constructor and arguments of the input expression - - - - - An active pattern to recognize expressions that represent construction of delegate values - - The input expression to match against. - - When successful, the pattern binds the delegate type, argument parameters and body of the input expression - - - - - An active pattern to recognize expressions that represent invocations of a default constructor of a struct - - The input expression to match against. - - When successful, the pattern binds the relevant type of the input expression - - - - - An active pattern to recognize expressions that represent the construction of arrays - - The input expression to match against. - - When successful, the pattern binds the element type and values of the input expression - - - - - An active pattern to recognize expressions that represent recursive let bindings of one or more variables - - The input expression to match against. - - When successful, the pattern binds the bindings and body of the input expression - - - - - An active pattern to recognize expressions that represent let bindings - - The input expression to match against. - - When successful, the pattern binds the variable, binding expression and body of the input expression - - - - - An active pattern to recognize expressions that represent first class function values - - The input expression to match against. - - When successful, the pattern binds the variable and body of the input expression - - - - - An active pattern to recognize expressions that represent conditionals - - The input expression to match against. - - When successful, the pattern binds the condition, then-branch and else-branch of the input expression - - - - - An active pattern to recognize expressions that represent while loops - - The input expression to match against. - - When successful, the pattern binds the guard and body of the input expression - - - - - An active pattern to recognize expressions that represent loops over integer ranges - - The input expression to match against. - - When successful, the pattern binds the value, start, finish and body of the input expression - - - - - An active pattern to recognize expressions that represent setting a static or instance field - - The input expression to match against. - - When successful, the pattern binds the object, field and value of the input expression - - - - - An active pattern to recognize expressions that represent getting a static or instance field - - The input expression to match against. - - When successful, the pattern binds the object and field of the input expression - - - - - An active pattern to recognize expressions that represent coercions from one type to another - - The input expression to match against. - - When successful, the pattern binds the source expression and target type of the input expression - - - - - An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules, including witness arguments - - The input expression to match against. - - When successful, the pattern binds the object, method, witness-argument and argument sub-expressions of the input expression - - - - - An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules - - The input expression to match against. - - When successful, the pattern binds the object, method and argument sub-expressions of the input expression - - - - - An active pattern to recognize expressions that represent applications of first class function values - - The input expression to match against. - - When successful, the pattern binds the function and argument of the input expression - - - - - An active pattern to recognize expressions that represent setting the value held at an address - - The input expression to match against. - - When successful, the pattern binds the target and value expressions of the input expression - - - - - An active pattern to recognize expressions that represent getting the address of a value - - The input expression to match against. - - When successful, the pattern binds the sub-expression of the input AddressOf expression - - - - - Contains a set of primitive F# active patterns to analyze F# expression objects - - - Copies a block of memory to a specified destination address starting from a specified source address until a specified byte count of (count * sizeof<'T>). - - The destination pointer. - The source pointer. - The source pointer. - - - - - Copies a value to a specified destination address from a specified source address. - - The destination pointer. - The source pointer. - - - - - Initializes a specified block of memory starting at a specific address to a given byte count and initial byte value. - - The input pointer. - The initial byte value. - The total repeat count of the byte value. - - - - - Clears the value stored at the location of a given native pointer. - - The input pointer. - - - - - Tests whether the given native pointer is null. - - The input pointer. - - Whether the given native pointer is null. - - - - - Gets the null native pointer. - - The null native pointer. - - - - - Allocates a region of memory on the stack. - - The number of objects of type T to allocate. - - A typed pointer to the allocated memory. - - - - - Assigns the value into the memory location referenced by the typed native - pointer computed by adding index * sizeof<'T> to the given input pointer. - - The input pointer. - The index by which to offset the pointer. - The value to assign. - - - - - Assigns the value into the memory location referenced by the given typed native pointer. - - The input pointer. - The value to assign. - - - - - Dereferences the given typed native pointer. - - The input pointer. - - The value at the pointer address. - - - - - Dereferences the typed native pointer computed by adding index * sizeof<'T> to the - given input pointer. - - The input pointer. - The index by which to offset the pointer. - - The value at the pointer address. - - - - - Returns a typed native pointer by adding index * sizeof<'T> to the - given input pointer. - - The input pointer. - The index by which to offset the pointer. - - A typed pointer. - - - - - Converts a given typed native pointer to a managed pointer. - - The typed native pointer. - - The managed pointer. - - - - - Returns a Common IL (Intermediate Language) signature pointer for a given typed native pointer. - - The typed native pointer. - - A Common IL signature pointer. - - - - - Returns a typed native pointer for a Common IL (Intermediate Language) signature pointer. - - The Common IL signature pointer. - - A typed native pointer. - - - - - Returns an untyped native pointer for a given typed native pointer. - - The typed native pointer. - - An untyped native pointer. - - - - - Returns a typed native pointer for a untyped native pointer. - - The untyped native pointer. - - A typed native pointer. - - - - - Returns a machine address for a given typed native pointer. - - The typed native pointer. - - The machine address. - - - - - Returns a typed native pointer for a given machine address. - - The machine address. - - A typed native pointer. - - - - - Contains operations on native pointers. Use of these operators may - result in the generation of unverifiable code. - - - Library functionality for native interopability. See - also F# External Functions in - the F# Language Guide. - - - - First-class listening points (i.e. objects that permit you to register a callback - activated when the event is triggered). - - Events and Observables - - - A delegate type associated with the F# event type IEvent<_> - - The object that fired the event. - The event arguments. - - Events and Observables - - - First class event values for CLI events conforming to CLI Framework standards. - - Events and Observables - - - Remove a listener delegate from an event listener store. - - The delegate to be removed from the 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. - - A delegate to be invoked when the event is fired. - - - - - First class event values for arbitrary delegate types. - - F# gives special status to member properties compatible with type IDelegateEvent and - tagged with the CLIEventAttribute. In this case the F# compiler generates appropriate - CLI metadata to make the member appear to other CLI languages as a CLI event. - - Events and Observables - - - 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 type . - - Lazy Computation - - - Publishes the event as a first class value. - - - - - Triggers the event using the given parameters. - - The event parameters. - - - - - Creates an observable object. - The created event. - - - - - Event implementations for the IEvent<_> type. - - Events and Observables - - - Publishes the event as a first class event value. - - - - - Triggers the event using the given sender object and parameters. The sender object may be null. - - The object triggering the event. - The parameters for the event. - - - - - Creates an event object suitable for delegate types following the standard .NET Framework convention of a first 'sender' argument. - The created event. - - - - - Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument. - - Events and Observables - - - Publishes the event as a first class event value. - - - - - Triggers the event using the given parameters. - The parameters for the event. - - - - - Creates an event object suitable for implementing an arbitrary type of delegate. - The event object. - - - - - Event implementations for an arbitrary type of delegate. - - Events and Observables - - - Creates an asynchronous computation that just returns (). - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of empty else branches in the - async { ... } computation expression syntax. - An asynchronous computation that returns (). - - - - - Creates an asynchronous computation that runs computation repeatedly - until guard() becomes false. - - A cancellation check is performed whenever the computation is executed. - - The existence of this method permits the use of while in the - async { ... } computation expression syntax. - - The function to determine when to stop executing computation. - The function to be executed. Equivalent to the body - of a while expression. - - An asynchronous computation that behaves similarly to a while loop when run. - - - - - Creates an asynchronous computation that runs binder(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. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of use and use! in the - async { ... } computation expression syntax. - - The resource to be used and disposed. - The function that takes the resource and returns an asynchronous - computation. - - An asynchronous computation that binds and eventually disposes resource. - - - - - Creates an asynchronous computation that runs computation and returns its result. - If an exception happens then catchHandler(exn) is called and the resulting computation executed instead. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of try/with in the - async { ... } computation expression syntax. - - The input computation. - The function to run when computation throws an exception. - - An asynchronous computation that executes computation and calls catchHandler if an - exception is thrown. - - - - - Creates an asynchronous computation that runs computation. The action compensation is executed - after computation completes, whether computation exits normally or by an exception. If compensation raises an exception itself - the original exception is discarded and the new exception becomes the overall result of the computation. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of try/finally in the - async { ... } computation expression syntax. - - The input computation. - The action to be run after computation completes or raises an - exception (including cancellation). - - An asynchronous computation that executes computation and compensation afterwards or - when an exception is raised. - - - - - Delegates to the input computation. - - The existence of this method permits the use of return! in the - async { ... } computation expression syntax. - - The input computation. - - The input computation. - - - - - Creates an asynchronous computation that returns the result v. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of return in the - async { ... } computation expression syntax. - - The value to return from the computation. - - An asynchronous computation that returns value when executed. - - - - - Creates an asynchronous computation that enumerates the sequence seq - on demand and runs body for each element. - - A cancellation check is performed on each iteration of the loop. - - The existence of this method permits the use of for in the - async { ... } computation expression syntax. - - The sequence to enumerate. - A function to take an item from the sequence and create - an asynchronous computation. Can be seen as the body of the for expression. - - An asynchronous computation that will enumerate the sequence and run body - for each element. - - - - - Creates an asynchronous computation that runs generator. - - A cancellation check is performed when the computation is executed. - - The function to run. - - An asynchronous computation that runs generator. - - - - - Creates an asynchronous computation that first runs computation1 - and then runs computation2, returning the result of computation2. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of expression sequencing in the - async { ... } computation expression syntax. - - The first part of the sequenced computation. - The second part of the sequenced computation. - - An asynchronous computation that runs both of the computations sequentially. - - - - - Creates an asynchronous computation that runs computation, and when - computation generates a result T, runs binder res. - - A cancellation check is performed when the computation is executed. - - The existence of this method permits the use of let! in the - async { ... } computation expression syntax. - - The computation to provide an unbound result. - The function to bind the result of computation. - - An asynchronous computation that performs a monadic bind on the result - of computation. - - - - - - Generate an object used to build asynchronous computations using F# computation expressions. The value - 'async' is a pre-defined instance of this type. - - A cancellation check is performed when the computation is executed. - - - - The type of the async operator, used to build workflows for asynchronous computations. - - Async Programming - - - The F# compiler emits calls to this function to implement F# async expressions. - - A value indicating asynchronous execution. - - - - - The F# compiler emits calls to this function to implement F# async expressions. - - A value indicating asynchronous execution. - - - - - - Used by MailboxProcessor - - - - The F# compiler emits calls to this function to implement F# async expressions. - - A value indicating asynchronous execution. - - - - - The F# compiler emits calls to this function to implement F# async expressions. - - - - - The F# compiler emits calls to this function to implement F# async expressions. - - A value indicating asynchronous execution. - - - - - - Used by MailboxProcessor - - - - The F# compiler emits references to this type to implement F# async expressions. - - Async Internals - - - The F# compiler emits references to this type to implement F# async expressions. - - Async Internals - - - Gets the default cancellation token for executing asynchronous computations. - - The default CancellationToken. - - Cancellation and Exceptions - - - - Async.DefaultCancellationToken.Register(fun () -> printfn "Computation Cancelled") |> ignore - let primes = [ 2; 3; 5; 7; 11 ] - - for i in primes do - async { - do! Async.Sleep(i * 1000) - printfn $"{i}" - } - |> Async.Start - - Thread.Sleep(6000) - Async.CancelDefaultToken() - printfn "Tasks Finished" - - This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation and then - print "Computation Cancelled", followed by "Tasks Finished". - - - - Creates an asynchronous computation that returns the CancellationToken governing the execution - of the computation. - - In async { let! token = Async.CancellationToken ...} token can be used to initiate other - asynchronous operations that will cancel cooperatively with this workflow. - - An asynchronous computation capable of retrieving the CancellationToken from a computation - expression. - - Cancellation and Exceptions - - - - - Creates an asynchronous computation that executes computation. - If this computation is cancelled before it completes then the computation generated by - running compensation is executed. - - The input asynchronous computation. - The function to be run if the computation is cancelled. - - An asynchronous computation that runs the compensation if the input computation - is cancelled. - - Cancellation and Exceptions - - - - let primes = [ 2; 3; 5; 7; 11 ] - for i in primes do - Async.TryCancelled( - async { - do! Async.Sleep(i * 1000) - printfn $"{i}" - }, - fun oce -> printfn $"Computation Cancelled: {i}") - |> Async.Start - - Thread.Sleep(6000) - Async.CancelDefaultToken() - printfn "Tasks Finished" - - This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation - and then print "Computation Cancelled: 7", "Computation Cancelled: 11" and "Tasks Finished" in any order. - - - - Creates an asynchronous computation that queues a work item that runs - its continuation. - - A computation that generates a new work item in the thread pool. - - Threads and Contexts - - - - async { - do! Async.SwitchToNewThread() - do! someLongRunningComputation() - do! Async.SwitchToThreadPool() - - for i in 1 .. 10 do - do! someShortRunningComputation() - } |> Async.StartImmediate - - This will run someLongRunningComputation() without blocking the threads in the threadpool, and then switch to the - threadpool for shorter computations. - - - - Creates an asynchronous computation that creates a new thread and runs - its continuation in that thread. - - A computation that will execute on a new thread. - - Threads and Contexts - - - - async { - do! Async.SwitchToNewThread() - do! someLongRunningComputation() - } |> Async.StartImmediate - - This will run someLongRunningComputation() without blocking the threads in the threadpool. - - - - Creates an asynchronous computation that runs - its continuation using syncContext.Post. If syncContext is null - then the asynchronous computation is equivalent to SwitchToThreadPool(). - - The synchronization context to accept the posted computation. - - An asynchronous computation that uses the syncContext context to execute. - - Threads and Contexts - - - - - - - - Runs an asynchronous computation, starting immediately on the current operating system - thread. Call one of the three continuations when the operation completes. - - If no cancellation token is provided then the default cancellation token - is used. - - The asynchronous computation to execute. - The function called on success. - The function called on exception. - The function called on cancellation. - The CancellationToken to associate with the computation. - The default is used if this parameter is not provided. - - Starting Async Computations - - - - - Runs an asynchronous computation, starting immediately on the current operating system - thread, but also returns the execution as - - - If no cancellation token is provided then the default cancellation token is used. - You may prefer using this method if you want to achive a similar behviour to async await in C# as - async computation starts on the current thread with an ability to return a result. - - - The asynchronous computation to execute. - The CancellationToken to associate with the computation. - The default is used if this parameter is not provided. - - A that will be completed - in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) - - Starting Async Computations - - - - printfn "A" - - let t = - async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - } |> Async.StartImmediateAsTask - - printfn "D" - t.Wait() - printfn "E" - - Prints "A", "B", "D" immediately, then "C", "E" in 1 second. - - - - Runs an asynchronous computation, starting immediately on the current operating system - thread. - - If no cancellation token is provided then the default cancellation token is used. - - The asynchronous computation to execute. - The CancellationToken to associate with the computation. - The default is used if this parameter is not provided. - - Starting Async Computations - - - - printfn "A" - - async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - } |> Async.StartImmediate - - printfn "D" - - Prints "A", "B", "D" immediately, then "C" in 1 second - - - - Creates an asynchronous computation which starts the given computation as a - - Starting Async Computations - - - - - Starts 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, that is, - - 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. - - The child computation. - The timeout value in milliseconds. If one is not provided - then the default value of -1 corresponding to . - - A new computation that waits for the input computation to finish. - - Cancellation and Exceptions - - - - - let computeWithTimeout timeout = - async { - let! completor1 = - Async.StartChild( - (async { - do! Async.Sleep(1000) - return 1 - }), - millisecondsTimeout = timeout) - - let! completor2 = - Async.StartChild( - (async { - do! Async.Sleep(2000) - return 2 - }), - millisecondsTimeout = timeout) - - let! v1 = completor1 - let! v2 = completor2 - printfn $"Result: {v1 + v2}" - } |> Async.RunSynchronously - - Will throw a System.TimeoutException if called with a timeout less than 2000, otherwise will print "Result: 3". - - - - Executes a computation in the thread pool. - - If no cancellation token is provided then the default cancellation token is used. - - A that will be completed - in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled) - - Starting Async Computations - - - - printfn "A" - - let t = - async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - } |> Async.StartAsTask - - printfn "D" - t.Wait() - printfn "E" - - Prints "A", then "D", "B" quickly in any order, then "C", "E" in 1 second. - - - - Starts the asynchronous computation in the thread pool. Do not await its result. - - If no cancellation token is provided then the default cancellation token is used. - - The computation to run asynchronously. - The cancellation token to be associated with the computation. - If one is not supplied, the default cancellation token is used. - - Starting Async Computations - - - - printfn "A" - - async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - } |> Async.Start - - printfn "D" - - Prints "A", then "D", "B" quickly in any order, and then "C" in 1 second. - - - - - - Creates an asynchronous computation that will sleep for the given time. This is scheduled - using a System.Threading.Timer object. The operation will not block operating system threads - for the duration of the wait. - - - The amount of time to sleep. - - An asynchronous computation that will sleep for the given time. - - Thrown when the due time is negative. - - Awaiting Results - - - - async { - printfn "A" - do! Async.Sleep(TimeSpan(0, 0, 1)) - printfn "B" - } |> Async.Start - printfn "C" - - Prints "C", then "A" quickly, and then "B" 1 second later. - - - - - Creates an asynchronous computation that will sleep for the given time. This is scheduled - using a System.Threading.Timer object. The operation will not block operating system threads - for the duration of the wait. - - - The number of milliseconds to sleep. - - An asynchronous computation that will sleep for the given time. - - Thrown when the due time is negative - and not infinite. - - Awaiting Results - - - - async { - printfn "A" - do! Async.Sleep(1000) - printfn "B" - } |> Async.Start - - printfn "C" - - Prints "C" and "A" quickly in any order, and then "B" 1 second later - - - - Creates an asynchronous computation that executes all the given asynchronous computations sequentially. - - If all child computations succeed, an array of results is passed to the success continuation. - - If any child computation raises an exception, then the overall computation will trigger an - exception, and cancel the others. - - The overall computation will respond to cancellation while executing the child computations. - If cancelled, the computation will cancel any remaining child computations but will still wait - for the other child computations to complete. - - A sequence of distinct computations to be run in sequence. - - A computation that returns an array of values from the sequence of input computations. - - Composing Async Computations - - - - let primes = [ 2; 3; 5; 7; 10; 11 ] - let computations = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - - if i % 2 > 0 then - printfn $"{i}" - return true - else - return false - } - ] - - let t = - Async.Sequential(computations) - |> Async.StartAsTask - - t.Wait() - printfn $"%A{t.Result}" - - This will print "3", "5", "7", "11" with ~1-2 seconds between them except for pauses where even numbers would be and then - prints [| false; true; true; true; false; true |]. - - - - Runs the asynchronous computation and await its result. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - If no cancellation token is provided then the default cancellation token is used. - - The computation is started on the current thread if is null, - has - of true, and no timeout is specified. Otherwise the computation is started by queueing a new work item in the thread pool, - and the current thread is blocked awaiting the completion of the computation. - - The timeout parameter is given in milliseconds. A value of -1 is equivalent to - . - - - The computation to run. - The amount of time in milliseconds to wait for the result of the - computation before raising a . If no value is provided - for timeout then a default of -1 is used to correspond to . - The cancellation token to be associated with the computation. - If one is not supplied, the default cancellation token is used. - - The result of the computation. - - Starting Async Computations - - - - printfn "A" - - let result = async { - printfn "B" - do! Async.Sleep(1000) - printfn "C" - 17 - } |> Async.RunSynchronously - - printfn "D" - - Prints "A", "B" immediately, then "C", "D" in 1 second. result is set to 17. - - - - Creates an asynchronous computation that executes all the given asynchronous computations, - initially queueing each as work items and using a fork/join pattern. - - If all child computations succeed, an array of results is passed to the success continuation. - - If any child computation raises an exception, then the overall computation will trigger an - exception, and cancel the others. - - The overall computation will respond to cancellation while executing the child computations. - If cancelled, the computation will cancel any remaining child computations but will still wait - for the other child computations to complete. - - A sequence of distinct computations to be parallelized. - The maximum degree of parallelism in the parallel execution. - - A computation that returns an array of values from the sequence of input computations. - - Composing Async Computations - - - - let primes = [ 2; 3; 5; 7; 10; 11 ] - let computations = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - - return - if i % 2 > 0 then - printfn $"{i}" - true - else - false - } ] - - let t = - Async.Parallel(computations, maxDegreeOfParallelism=3) - |> Async.StartAsTask - - t.Wait() - printfn $"%A{t.Result}" - - This will print "3", "5" (in any order) in 1-2 seconds, and then "7", "11" (in any order) in 1-2 more seconds and then - [| false; true; true; true; false; true |]. - - - - Creates an asynchronous computation that executes all the given asynchronous computations, - initially queueing each as work items and using a fork/join pattern. - - If all child computations succeed, an array of results is passed to the success continuation. - - If any child computation raises an exception, then the overall computation will trigger an - exception, and cancel the others. - - The overall computation will respond to cancellation while executing the child computations. - If cancelled, the computation will cancel any remaining child computations but will still wait - for the other child computations to complete. - - A sequence of distinct computations to be parallelized. - - A computation that returns an array of values from the sequence of input computations. - - Composing Async Computations - - - - let primes = [ 2; 3; 5; 7; 10; 11 ] - let t = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - - if i % 2 > 0 then - printfn $"{i}" - return true - else - return false - } - ] - |> Async.Parallel - |> Async.StartAsTask - - t.Wait() - printfn $"%A{t.Result}" - - This will print "3", "5", "7", "11" (in any order) in 1-2 seconds and then [| false; true; true; true; false; true |]. - - - - Generates a scoped, cooperative cancellation handler for use within an asynchronous workflow. - - For example, - async { use! holder = Async.OnCancel interruption ... } - 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 - interruption is executed on the thread that is performing the cancellation. This can - be used to arrange for a computation to be asynchronously notified that a cancellation - has occurred, e.g. by setting a flag, or deregistering a pending I/O action. - - The function that is executed on the thread performing the - cancellation. - - An asynchronous computation that triggers the interruption if it is cancelled - before being disposed. - - Cancellation and Exceptions - - - - let primes = [ 2; 3; 5; 7; 11 ] - for i in primes do - async { - use! holder = Async.OnCancel(fun () -> printfn $"Computation Cancelled: {i}") - do! Async.Sleep(i * 1000) - printfn $"{i}" - } - |> Async.Start - - Thread.Sleep(6000) - Async.CancelDefaultToken() - printfn "Tasks Finished" - - This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation - and then print "Computation Cancelled: 7", "Computation Cancelled: 11" and "Tasks Finished" in any order. - - - - Creates an asynchronous computation that runs the given computation and ignores - its result. - - The input computation. - - A computation that is equivalent to the input computation, but disregards the result. - - Composing Async Computations - - - - let readFile filename numBytes = - async { - use file = System.IO.File.OpenRead(filename) - printfn "Reading from file %s." filename - // Throw away the data being read. - do! file.AsyncRead(numBytes) |> Async.Ignore - } - readFile "example.txt" 42 |> Async.Start - - Reads bytes from a given file asynchronously and then ignores the result, allowing the do! to be used with functions - that return an unwanted value. - - - - Creates an asynchronous computation that captures the current - success, exception and cancellation continuations. The callback must - eventually call exactly one of the given continuations. - - The function that accepts the current success, exception, and cancellation - continuations. - - An asynchronous computation that provides the callback with the current continuations. - - Composing Async Computations - - - - let someRiskyBusiness() = - match DateTime.Today with - | dt when dt.DayOfWeek = DayOfWeek.Monday -> failwith "Not compatible with Mondays" - | dt -> dt - - let computation = - (fun (successCont, exceptionCont, cancellationCont) -> - try - someRiskyBusiness () |> successCont - with - | :? OperationCanceledException as oce -> cancellationCont oce - | e -> exceptionCont e) - |> Async.FromContinuations - - Async.StartWithContinuations( - computation, - (fun result -> printfn $"Result: {result}"), - (fun e -> printfn $"Exception: {e}"), - (fun oce -> printfn $"Cancelled: {oce}") - ) - - This anonymous function will call someRiskyBusiness() and properly use the provided continuations - defined to report the outcome. - - - - Creates an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET 2.0 APIs. - - The computation will respond to cancellation while waiting for the completion - of the operation. If a cancellation occurs, and cancelAction is specified, then it is - executed, and the computation continues to wait for the completion of the operation. - - If cancelAction is not specified, then cancellation causes the computation - to stop immediately, and subsequent invocations of the callback are ignored. - - The first argument for the operation. - The second argument for the operation. - The third argument for the operation. - The function initiating a traditional CLI asynchronous operation. - The function completing a traditional CLI asynchronous operation. - An optional function to be executed when a cancellation is requested. - - An asynchronous computation wrapping the given Begin/End functions. - - Legacy .NET Async Interoperability - - - - - - Creates an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET 2.0 APIs. - - The computation will respond to cancellation while waiting for the completion - of the operation. If a cancellation occurs, and cancelAction is specified, then it is - executed, and the computation continues to wait for the completion of the operation. - - If cancelAction is not specified, then cancellation causes the computation - to stop immediately, and subsequent invocations of the callback are ignored. - - The first argument for the operation. - The second argument for the operation. - The function initiating a traditional CLI asynchronous operation. - The function completing a traditional CLI asynchronous operation. - An optional function to be executed when a cancellation is requested. - - An asynchronous computation wrapping the given Begin/End functions. - - Legacy .NET Async Interoperability - - - - - - Creates an asynchronous computation in terms of a Begin/End pair of actions in - the style used in .NET 2.0 APIs. - - - The computation will respond to cancellation while waiting for the completion - of the operation. If a cancellation occurs, and cancelAction is specified, then it is - executed, and the computation continues to wait for the completion of the operation. - - If cancelAction is not specified, then cancellation causes the computation - to stop immediately, and subsequent invocations of the callback are ignored. - - - The argument for the operation. - The function initiating a traditional CLI asynchronous operation. - The function completing a traditional CLI asynchronous operation. - An optional function to be executed when a cancellation is requested. - - An asynchronous computation wrapping the given Begin/End functions. - - Legacy .NET Async Interoperability - - - - - - Creates an asynchronous computation in terms of a Begin/End pair of actions in - the style used in CLI APIs. - - - - The computation will respond to cancellation while waiting for the completion - of the operation. If a cancellation occurs, and cancelAction is specified, then it is - executed, and the computation continues to wait for the completion of the operation. - - If cancelAction is not specified, then cancellation causes the computation - to stop immediately, and subsequent invocations of the callback are ignored. - - The function initiating a traditional CLI asynchronous operation. - The function completing a traditional CLI asynchronous operation. - An optional function to be executed when a cancellation is requested. - - An asynchronous computation wrapping the given Begin/End functions. - - Legacy .NET Async Interoperability - - - - - - Creates an asynchronous computation that executes all given asynchronous computations in parallel, - returning the result of the first succeeding computation (one whose result is 'Some x'). - If all child computations complete with None, the parent computation also returns None. - - - - If any child computation raises an exception, then the overall computation will trigger an - exception, and cancel the others. - - The overall computation will respond to cancellation while executing the child computations. - If cancelled, the computation will cancel any remaining child computations but will still wait - for the other child computations to complete. - - - A sequence of computations to be parallelized. - - A computation that returns the first succeeding computation. - - Composing Async Computations - - - - printfn "Starting" - let primes = [ 2; 3; 5; 7 ] - let computations = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - return if i % 2 > 0 then Some(i) else None - } - ] - - computations - |> Async.Choice - |> Async.RunSynchronously - |> function - | Some (i) -> printfn $"{i}" - | None -> printfn "No Result" - - Prints one randomly selected odd number in 1-2 seconds. If the list is changed to all even numbers, it will - instead print "No Result". - - - - - let primes = [ 2; 3; 5; 7 ] - let computations = - [ for i in primes do - async { - do! Async.Sleep(System.Random().Next(1000, 2000)) - - return - if i % 2 > 0 then - Some(i) - else - failwith $"Even numbers not supported: {i}" - } - ] - - computations - |> Async.Choice - |> Async.RunSynchronously - |> function - | Some (i) -> printfn $"{i}" - | None -> printfn "No Result" - - Will sometimes print one randomly selected odd number, sometimes throw System.Exception("Even numbers not supported: 2"). - - - - Creates an asynchronous computation that executes computation. - If this computation completes successfully then return Choice1Of2 with the returned - value. If this computation raises an exception before it completes then return Choice2Of2 - with the raised exception. - - The input computation that returns the type T. - - A computation that returns a choice of type T or exception. - - Cancellation and Exceptions - - - - let someRiskyBusiness() = - match DateTime.Today with - | dt when dt.DayOfWeek = DayOfWeek.Monday -> failwith "Not compatible with Mondays" - | dt -> dt - - async { return someRiskyBusiness() } - |> Async.Catch - |> Async.RunSynchronously - |> function - | Choice1Of2 result -> printfn $"Result: {result}" - | Choice2Of2 e -> printfn $"Exception: {e}" - - Prints the returned value of someRiskyBusiness() or the exception if there is one. - - - - Raises the cancellation condition for the most recent set of asynchronous computations started - without any specific CancellationToken. Replaces the global CancellationTokenSource with a new - global token source for any asynchronous computations created after this point without any - specific CancellationToken. - - Cancellation and Exceptions - - - - let primes = [ 2; 3; 5; 7; 11 ] - - let computations = - [ for i in primes do - async { - do! Async.Sleep(i * 1000) - printfn $"{i}" - } - ] - - try - let t = - Async.Parallel(computations, 3) |> Async.StartAsTask - - Thread.Sleep(6000) - Async.CancelDefaultToken() - printfn $"Tasks Finished: %A{t.Result}" - with - | :? System.AggregateException as ae -> printfn $"Tasks Not Finished: {ae.Message}" - - This will print "2" 2 seconds from start, "3" 3 seconds from start, "5" 5 seconds from start, cease computation and - then print "Tasks Not Finished: One or more errors occurred. (A task was canceled.)". - - - - Creates an asynchronous computation that will wait on the given WaitHandle. - - The computation returns true if the handle indicated a result within the given timeout. - - The WaitHandle that can be signalled. - The timeout value in milliseconds. If one is not provided - then the default value of -1 corresponding to . - - An asynchronous computation that waits on the given WaitHandle. - - Awaiting Results - - - - - Return an asynchronous computation that will wait for the given task to complete and return - its result. - - The task to await. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - If the task is cancelled then is raised. Note - that the task may be governed by a different cancellation token to the overall async computation - where the AwaitTask occurs. In practice you should normally start the task with the - cancellation token returned by let! ct = Async.CancellationToken, and catch - any at the point where the - overall async is started. - - - Awaiting Results - - - - - Return an asynchronous computation that will wait for the given task to complete and return - its result. - - The task to await. - - If an exception occurs in the asynchronous computation then an exception is re-raised by this - function. - - If the task is cancelled then is raised. Note - that the task may be governed by a different cancellation token to the overall async computation - where the AwaitTask occurs. In practice you should normally start the task with the - cancellation token returned by let! ct = Async.CancellationToken, and catch - any at the point where the - overall async is started. - - - Awaiting Results - - - - - Creates an asynchronous computation that will wait on the IAsyncResult. - - The computation returns true if the handle indicated a result within the given timeout. - - The IAsyncResult to wait on. - The timeout value in milliseconds. If one is not provided - then the default value of -1 corresponding to . - - An asynchronous computation that waits on the given IAsyncResult. - - Awaiting Results - - - - - Creates an asynchronous computation that waits for a single invocation of a CLI - event by adding a handler to the event. Once the computation completes or is - cancelled, the handler is removed from the event. - - The computation will respond to cancellation while waiting for the event. If a - cancellation occurs, and cancelAction is specified, then it is executed, and - the computation continues to wait for the event. - - If cancelAction is not specified, then cancellation causes the computation - to cancel immediately. - - The event to handle once. - An optional function to execute instead of cancelling when a - cancellation is issued. - - An asynchronous computation that waits for the event to be invoked. - - Awaiting Results - - - - - Creates three functions that can be used to implement the .NET 1.0 Asynchronous - Programming Model (APM) for a given asynchronous computation. - - A function generating the asynchronous computation to split into the traditional - .NET Asynchronous Programming Model. - - A tuple of the begin, end, and cancel members. - - Legacy .NET Async Interoperability - - - - - Holds static members for creating and manipulating asynchronous computations. - - - See also F# Language Guide - Async Workflows. - - - Async Programming - - - - An asynchronous computation, which, when run, will eventually produce a value of type T, or else raises an exception. - - - - This type has no members. Asynchronous computations are normally specified either by using an async expression - or the static methods in the type. - - See also F# Language Guide - Async Workflows. - - - - Library functionality for asynchronous programming, events and agents. See also - Asynchronous Programming, - Events and - Lazy Expressions in the - F# Language Guide. - - - Async Programming - - - - The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. - - - - - Hosts the task code in a state machine and starts the task, executing in the threadpool using Task.Run - - - - - Contains methods to build tasks using the F# computation expression syntax - - - - - The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. - - - - - Hosts the task code in a state machine and starts the task. - - - - - Contains methods to build tasks using the F# computation expression syntax - - - - - Specifies a unit of task code which produces no result - - - - - Specifies the iterative execution of a unit of task code. - - - - - Specifies a unit of task code which excuted using try/with semantics - - - - - Specifies a unit of task code which excuted using try/finally semantics - - - - - Specifies a unit of task code which returns a value - - - - - Specifies the iterative execution of a unit of task code. - - - - - Specifies the delayed execution of a unit of task code. - - - - - Specifies the sequential composition of two units of task code. - - - - - Contains methods to build tasks using the F# computation expression syntax - - - - - A special compiler-recognised delegate type for specifying blocks of task code - with access to the state machine. - - - - - Represents the runtime continuation of a task state machine created dynamically - - - - - This is used by the compiler as a template for creating state machine structs - - - - - Holds the MethodBuilder for the state machine - - - - - Holds the final result of the state machine - - - - - The extra data stored in ResumableStateMachine for tasks - - - - Raises a timeout exception if a message not received in this amount of time. By default - no timeout is used. - - - - - Occurs when the execution of the agent results in an exception. - - - - - Occurs when the execution of the agent results in an exception. - - - - - Raises a timeout exception if a message not received in this amount of time. By default - no timeout is used. - - - - - Returns the number of unprocessed messages in the message queue of the agent. - - - - - Occurs when the execution of the agent results in an exception. - - - - - Scans for a message by looking through messages in arrival order until scanner - returns a Some value. Other messages remain in the queue. - - This method is for use within the body of the agent. For each agent, at most - one concurrent reader may be active, so no more than one concurrent call to - Receive, TryReceive, Scan and/or TryScan may be active. - - The function to return None if the message is to be skipped - or Some if the message is to be processed and removed from the queue. - An optional timeout in milliseconds. Defaults to -1 which corresponds - to . - - An asynchronous computation that scanner built off the read message. - - - - - Waits for a message. This will consume the first message in arrival order. - - This method is for use within the body of the agent. - - Returns None if a timeout is given and the timeout is exceeded. - - This method is for use within the body of the agent. For each agent, at most - one concurrent reader may be active, so no more than one concurrent call to - Receive, TryReceive, Scan and/or TryScan may be active. - An optional timeout in milliseconds. Defaults to -1 which - corresponds to . - - An asynchronous computation that returns the received message or - None if the timeout is exceeded. - - - - - Like PostAndReply, but returns None if no reply within the timeout period. - - The function to incorporate the AsyncReplyChannel into - the message to be sent. - An optional timeout parameter (in milliseconds) to wait for a reply message. - Defaults to -1 which corresponds to . - - The reply from the agent or None if the timeout expires. - - - - - Starts the agent immediately on the current operating system thread. - - - - - Creates and starts an agent immediately on the current operating system thread. The body - function is used to generate the asynchronous computation executed by the agent. - - The function to produce an asynchronous computation that will be executed - as the read loop for the MailboxProcessor when StartImmediately is called. - An optional cancellation token for the body. - Defaults to Async.DefaultCancellationToken. - - The created MailboxProcessor. - - - - - Starts the agent. - - - - - Creates and starts an agent. The body function is used to generate the asynchronous - computation executed by the agent. - - The function to produce an asynchronous computation that will be executed - as the read loop for the MailboxProcessor when Start is called. - An optional cancellation token for the body. - Defaults to Async.DefaultCancellationToken. - - The created MailboxProcessor. - - - - - Scans for a message by looking through messages in arrival order until scanner - returns a Some value. Other messages remain in the queue. - - Returns None if a timeout is given and the timeout is exceeded. - - This method is for use within the body of the agent. For each agent, at most - one concurrent reader may be active, so no more than one concurrent call to - Receive, TryReceive, Scan and/or TryScan may be active. - - The function to return None if the message is to be skipped - or Some if the message is to be processed and removed from the queue. - An optional timeout in milliseconds. Defaults to -1 which corresponds - to . - - An asynchronous computation that scanner built off the read message. - - Thrown when the timeout is exceeded. - - - - - Waits for a message. This will consume the first message in arrival order. - - This method is for use within the body of the agent. - - This method is for use within the body of the agent. For each agent, at most - one concurrent reader may be active, so no more than one concurrent call to - Receive, TryReceive, Scan and/or TryScan may be active. - An optional timeout in milliseconds. Defaults to -1 which corresponds - to . - - An asynchronous computation that returns the received message. - Thrown when the timeout is exceeded. - - - - - Like AsyncPostAndReply, but returns None if no reply within the timeout period. - - The function to incorporate the AsyncReplyChannel into - the message to be sent. - An optional timeout parameter (in milliseconds) to wait for a reply message. - Defaults to -1 which corresponds to . - - An asynchronous computation that will return the reply or None if the timeout expires. - - - - - Posts a message to an agent and await a reply on the channel, synchronously. - - The message is generated by applying buildMessage to a new reply channel - to be incorporated into the message. The receiving agent must process this - message and invoke the Reply method on this reply channel precisely once. - The function to incorporate the AsyncReplyChannel into - the message to be sent. - An optional timeout parameter (in milliseconds) to wait for a reply message. - Defaults to -1 which corresponds to . - - The reply from the agent. - - - - - Posts a message to an agent and await a reply on the channel, asynchronously. - - The message is generated by applying buildMessage to a new reply channel - to be incorporated into the message. The receiving agent must process this - message and invoke the Reply method on this reply channel precisely once. - The function to incorporate the AsyncReplyChannel into - the message to be sent. - An optional timeout parameter (in milliseconds) to wait for a reply message. - Defaults to -1 which corresponds to . - - An asynchronous computation that will wait for the reply from the agent. - - - - - Posts a message to the message queue of the MailboxProcessor, asynchronously. - - The message to post. - - - - - Disposes the agent's internal resources. - - - - - Creates an agent. The body function is used to generate the asynchronous - computation executed by the agent. This function is not executed until - Start is called. - - The function to produce an asynchronous computation that will be executed - as the read loop for the MailboxProcessor when Start is called. - An optional cancellation token for the body. - Defaults to Async.DefaultCancellationToken. - - The created MailboxProcessor. - - - - - A message-processing agent which executes an asynchronous computation. - - The agent encapsulates a message queue that supports multiple-writers and - a single reader agent. Writers send messages to the agent by using the Post - method and its variations. - - The agent may wait for messages using the Receive or TryReceive methods or - scan through all available messages using the Scan or TryScan method. - - Agents - - - Sends a reply to a PostAndReply message. - The value to send. - - - A handle to a capability to reply to a PostAndReply message. - - Agents - - - Forces the execution of this value and return its result. Same as Value. Mutual exclusion is used to - prevent other threads also computing the value. - The value of the Lazy object. - - - Creates a lazy computation that evaluates to the given value when forced. - - The input value. - - The created Lazy object. - - - Creates a lazy computation that evaluates to the result of the given function when forced. - - The function to provide the value when needed. - - The created Lazy object. - - - Extensions related to Lazy values. - - Lazy Computation - - - Returns an asynchronous computation that, when run, will wait for the download of the given URI to specified file. - - The URI to retrieve. - The file name to save download to. - - An asynchronous computation that will wait for the download of the URI to specified file. - - - - open System.Net - open System - let client = new WebClient() - Uri("https://www.w3.com") |> fun x -> client.AsyncDownloadFile(x, "output.html") |> Async.RunSynchronously - - This will download the server response as a file and output it as output.html - - - - Returns an asynchronous computation that, when run, will wait for the download of the given URI. - - The URI to retrieve. - - An asynchronous computation that will wait for the download of the URI. - - - - open System.Net - open System.Text - open System - let client = new WebClient() - client.AsyncDownloadData(Uri("https://www.w3.org")) |> Async.RunSynchronously |> Encoding.ASCII.GetString - - - Downloads the data in bytes and decodes it to a string. - - - Returns an asynchronous computation that, when run, will wait for the download of the given URI. - - The URI to retrieve. - - An asynchronous computation that will wait for the download of the URI. - - - - open System - let client = new WebClient() - Uri("https://www.w3.org") |> client.AsyncDownloadString |> Async.RunSynchronously - - This will download the server response from https://www.w3.org - - - - Returns an asynchronous computation that, when run, will wait for a response to the given WebRequest. - An asynchronous computation that waits for response to the WebRequest. - - - - open System.Net - open System.IO - let responseStreamToString = fun (responseStream : WebResponse) -> - let reader = new StreamReader(responseStream.GetResponseStream()) - reader.ReadToEnd() - let webRequest = WebRequest.Create("https://www.w3.org") - let result = webRequest.AsyncGetResponse() |> Async.RunSynchronously |> responseStreamToString - - - Gets the web response asynchronously and converts response stream to string - - - A module of extension members providing asynchronous operations for some basic Web operations. - - Async Programming - - - Connects a listener function to the observable. The listener will - be invoked for each observation. The listener can be removed by - calling Dispose on the returned IDisposable object. - - The function to be called for each observation. - - An object that will remove the listener if disposed. - - - - - Permanently connects a listener function to the observable. The listener will - be invoked for each observation. - - The function to be called for each observation. - - - - - Returns an asynchronous computation that will write the given bytes to the stream. - - The buffer to write from. - An optional offset as a number of bytes in the stream. - An optional number of bytes to write to the stream. - - An asynchronous computation that will write the given bytes to the stream. - - Thrown when the sum of offset and count is longer than - the buffer length. - Thrown when offset or count is negative. - - - - - Returns an asynchronous computation that will read the given number of bytes from the stream. - - The number of bytes to read. - - An asynchronous computation that returns the read byte[] when run. - - - - - Returns an asynchronous computation that will read from the stream into the given buffer. - The buffer to read into. - An optional offset as a number of bytes in the stream. - An optional number of bytes to read from the stream. - - An asynchronous computation that will read from the stream into the given buffer. - - Thrown when the sum of offset and count is longer than - the buffer length. - Thrown when offset or count is negative. - - - - - A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O. - - Async Programming - - - The F# compiler emits calls to this function to implement the try/with construct for F# async expressions. - - The async activation. - The computation to protect. - The exception filter. - - A value indicating asynchronous execution. - - - The F# compiler emits calls to this function to implement the try/finally construct for F# async expressions. - - The async activation. - The computation to protect. - The finally code. - - A value indicating asynchronous execution. - - - The F# compiler emits calls to this function to implement the let! construct for F# async expressions. - - The async activation. - The first part of the computation. - A function returning the second part of the computation. - - An async activation suitable for running part1 of the asynchronous execution. - - - The F# compiler emits calls to this function to implement constructs for F# async expressions. - - The async activation. - The result of the first part of the computation. - A function returning the second part of the computation. - - A value indicating asynchronous execution. - - - The F# compiler emits calls to this function to implement constructs for F# async expressions. - - The async computation. - The async activation. - - A value indicating asynchronous execution. - - - The F# compiler emits calls to this function to implement F# async expressions. - - The body of the async computation. - - The async computation. - - - Entry points for generated code - - Async Internals - - - - The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. - - - - - Specifies a unit of task code which draws a result from a task. - - - - - Specifies a unit of task code which draws a result from a task then calls a continuation. - - - - - Contains high-priority overloads for the `task` computation expression builder. - - - - - Specifies a unit of task code which draws a result from an F# async value. - - - - - Specifies a unit of task code which draws a result from an F# async value then calls a continuation. - - - - - Contains medium-priority overloads for the `task` computation expression builder. - - - - - Specifies a unit of task code which binds to the resource implementing IDisposable and disposes it synchronously - - - - - The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. - - - - - Specifies a unit of task code which draws its result from a task-like value - satisfying the GetAwaiter pattern. - - - - - Specifies a unit of task code which draws a result from a task-like value - satisfying the GetAwaiter pattern and calls a continuation. - - - - - Contains low-priority overloads for the `task` computation expression builder. - - - - - Builds a task using computation expression syntax which switches to execute on a background thread if not - already doing so. - - - - If the task is created on a foreground thread (where is non-null) - its body is executed on a background thread using . - If created on a background thread (where is null) it is executed - immediately on that thread. - - - - - - - Builds a task using computation expression syntax. - - - - - - - Contains the `task` computation expression builder. - - - - Returns 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. - - The input event. - - An event that triggers on pairs of consecutive values passed from the source event. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let pairWise = Event.pairwise timer - - let extractPair (pair: Timers.ElapsedEventArgs * Timers.ElapsedEventArgs) = - let leftPair, rightPair = pair - printfn $"(Left): {leftPair.SignalTime} (Right): {rightPair.SignalTime}" - - pairWise.Subscribe(extractPair) |> ignore - - Console.ReadLine() |> ignore - - The sample will output the timer event every second: - (Left): 2/14/2022 11:58:46 PM (Right): 2/14/2022 11:58:46 PM - (Left): 2/14/2022 11:58:46 PM (Right): 2/14/2022 11:58:47 PM - (Left): 2/14/2022 11:58:47 PM (Right): 2/14/2022 11:58:48 PM - - - - Runs the given function each time the given event is triggered. - - The function to call when the event is triggered. - The input event. - - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - Event.add (fun (event: Timers.ElapsedEventArgs) -> printfn $"{event.SignalTime} ") timer - - Console.ReadLine() |> ignore - - The sample will output the timer event every second: - 2/14/2022 11:52:05 PM - 2/14/2022 11:52:06 PM - 2/14/2022 11:52:07 PM - 2/14/2022 11:52:08 PM - - - - Returns 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. - - The function to update the state with each event value. - The initial state. - The input event. - - An event that fires on the updated state values. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let multiplyBy number = - fun (timerEvent: Timers.ElapsedEventArgs) -> number * timerEvent.SignalTime./// Second - - let initialState = 2 - - let scan = Event.scan multiplyBy initialState timer - - scan.Subscribe(fun x -> printf "%A " x) |> ignore - - Console.ReadLine() |> ignore - - The sample will output depending on your timestamp. It will multiply the seconds with an initial state of 2: 106 5724 314820 17629920 1004905440 -1845026624 -1482388416 - - - - Returns 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. - - The function to select and transform event values to pass on. - The input event. - - An event that fires only when the chooser returns Some. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let getEvenSeconds (number: Timers.ElapsedEventArgs) = - match number with - | _ when number.SignalTime.Second % 2 = 0 -> Some number.SignalTime - | _ -> None - - let evenSecondsEvent = Event.choose getEvenSeconds timer - - evenSecondsEvent.Subscribe(fun x -> printfn $"{x} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will output: 2/15/2022 12:04:04 AM - 2/15/2022 12:04:06 AM - 2/15/2022 12:04:08 AM - - - - Returns 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. - - The function to transform event values into one of two types. - The input event. - - A tuple of events. The first fires whenever splitter evaluates to Choice1of1 and - the second fires whenever splitter evaluates to Choice2of2. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let bySeconds (timerEvent: Timers.ElapsedEventArgs) = - match timerEvent.SignalTime.Second % 2 = 0 with - | true -> Choice1Of2 timerEvent.SignalTime.Second - | false -> Choice2Of2 $"{timerEvent.SignalTime.Second} is not an even num ber" - - let evenSplit, printOddNumbers = Event.split bySeconds timer - - let printOutput event functionName = - Event.add (fun output -> printfn $"{functionName} - Split output: {output}. /// Type: {output.GetType()}") event - - printOutput evenSplit (nameof evenSplit) |> ignore - - printOutput printOddNumbers (nameof printOddNumbers) - |> ignore - - Console.ReadLine() |> ignore - - The sample will split the events by even or odd seconds: evenSplit - Split output: 44. Type: System.Int32 - printOddNumbers - Split output: 45 is not an even number. Type: System.String - evenSplit - Split output: 46. Type: System.Int32 - printOddNumbers - Split output: 47 is not an even number. Type: System.String - evenSplit - Split output: 48. Type: System.Int32 - printOddNumbers - Split output: 49 is not an even number. Type: System.String - - - - Returns 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. - - The function to determine which output event to trigger. - The input event. - - A tuple of events. The first is triggered when the predicate evaluates to true - and the second when the predicate evaluates to false. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let getEvenSeconds (number: Timers.ElapsedEventArgs) = - match number with - | _ when number.SignalTime.Second % 2 = 0 -> true - | _ -> false - - let leftPartition, rightPartition = Event.partition getEvenSeconds timer - - leftPartition.Subscribe(fun x -> printfn $"Left partition: {x.SignalTime}") - |> ignore - - rightPartition.Subscribe(fun x -> printfn $"Right partition: {x.SignalTime}") - |> ignore - - Console.ReadLine() |> ignore - - The sample will partition into two events if it is even or odd seconds: - Right partition: 2/15/2022 12:00:27 AM - Left partition: 2/15/2022 12:00:28 AM - Right partition: 2/15/2022 12:00:29 AM - Left partition: 2/15/2022 12:00:30 AM - Right partition: 2/15/2022 12:00:31 AM - - - - Returns 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. - - The function to determine which triggers from the event to propagate. - The input event. - - An event that only passes values that pass the predicate. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let getEvenSeconds (number: Timers.ElapsedEventArgs) = - match number with - | _ when number.SignalTime.Second % 2 = 0 -> true - | _ -> false - - let evenSecondsEvent = Event.filter getEvenSeconds timer - - evenSecondsEvent.Subscribe(fun x -> printfn $"{x} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will only output even seconds: 2/15/2022 12:03:08 AM - 2/15/2022 12:03:10 AM - 2/15/2022 12:03:12 AM - 2/15/2022 12:03:14 AM - - - - Returns a new event that passes values transformed by the given function. - - The function to transform event values. - The input event. - - An event that passes the transformed values. - - - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let timer = createTimer 1000 - - let transformSeconds (number: Timers.ElapsedEventArgs) = - match number with - | _ when number.SignalTime.Second % 2 = 0 -> 100 - | _ -> -500 - - let evenSecondsEvent = Event.map transformSeconds timer - - evenSecondsEvent.Subscribe(fun x -> printf $"{x} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will transform the seconds if it's even or odd number and the output is: -500 100 -500 100 -500 100 - - - - Fires the output event when either of the input events fire. - The first input event. - The second input event. - - An event that fires when either of the input events fire. - - - open System.Reactive.Linq - open System - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - timer.Elapsed - - let oneSecondTimer = createTimer 1000 - let fiveSecondsTimer = createTimer 5000 - - let result = Event.merge oneSecondTimer fiveSecondsTimer - - result.Subscribe(fun output -> printfn $"Output - {output.SignalTime} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will output: Output - 2/15/2022 12:10:40 AM - Output - 2/15/2022 12:10:41 AM - Output - 2/15/2022 12:10:41 AM - Output - 2/15/2022 12:10:42 AM - Output - 2/15/2022 12:10:43 AM - - - - Contains operations for working with values of type . - - Events and Observables - - - Returns a new observable that triggers on the second and subsequent triggerings of the input observable. - The Nth triggering of the input observable 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. - - For each observer, the registered intermediate observing object is not thread safe. - That is, observations arising from the source must not be triggered concurrently - on different threads. - The input Observable. - - An Observable that triggers on successive pairs of observations from the input Observable. - - - - /// open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let pairWise = Observable.pairwise observableNumbers - - pairWise.Subscribe(fun pair -> printf $"{pair} ") - |> ignore - - The sample evaluates to: (1, 2), (2, 3), (3, 4), (4, 5) - - - - Creates an observer which subscribes to the given observable and which calls - the given function for each observation. - - The function to be called on each observation. - The input Observable. - - An object that will remove the callback if disposed. - - - - open System.Reactive.Linq - let numbers = seq { 1..3 } - let observableNumbers = Observable.ToObservable numbers - let printOutput observable = - use subscription = Observable.subscribe (fun x -> printfn "%A" x) observable - subscription - printOutput observableNumbers |> ignore - - The sample evaluates to: 1, 2, 3 - - - - Creates an observer which permanently subscribes to the given observable and which calls - the given function for each observation. - - The function to be called on each observation. - The input Observable. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - let multiplyByTwo = fun number -> printf $"{number * 2} " - Observable.add multiplyByTwo observableNumbers - - The sample evaluates to: 2 4 6 8 10 - - - - Returns an observable which, for each observer, allocates an item of state - and applies the given accumulating function to successive values arising from - the input. The returned object will trigger observations for each computed - state value, excluding the initial value. The returned object propagates - all errors arising from the source and completes when the source completes. - - For each observer, the registered intermediate observing object is not thread safe. - That is, observations arising from the source must not be triggered concurrently - on different threads. - The function to update the state with each observation. - The initial state. - The input Observable. - - An Observable that triggers on the updated state values. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let multiplyBy number = fun y -> number * y - let initialState = 2 - let scan = Observable.scan multiplyBy initialState observableNumbers - - scan.Subscribe(fun x -> printf "%A " x) |> ignore - - The sample evaluates to: 2 4 12 48 240 - - - - Returns an observable which chooses a projection of observations from the source - using the given function. The returned object will trigger observations x - for which the splitter returns Some x. The returned object also propagates - all errors arising from the source and completes when the source completes. - - The function that returns Some for observations to be propagated - and None for observations to ignore. - The input Observable. - - An Observable that only propagates some of the observations from the source. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let getOddNumbers number = - match number with - | _ when number % 2 = 0 -> None - | _ -> Some number - - let map = Observable.choose getOddNumbers observableNumbers - - map.Subscribe(fun x -> printf $"{x} ") |> ignore - - The sample will output: 1 3 5 - - - - Returns two observables which split the observations of the source by the - given function. The first will trigger observations x for which the - splitter returns Choice1Of2 x. The second will trigger observations - y for which the splitter returns Choice2Of2 y The splitter is - executed once for each subscribed observer. Both also propagate error - observations arising from the source and each completes when the source - completes. - - The function that takes an observation an transforms - it into one of the two output Choice types. - The input Observable. - - A tuple of Observables. The first triggers when splitter returns Choice1of2 - and the second triggers when splitter returns Choice2of2. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let getEvenNumbers number = - match number % 2 = 0 with - | true -> Choice1Of2 number - | false -> Choice2Of2 $"{number} is not an even number" - - let evenSplit, printOddNumbers = Observable.split getEvenNumbers observableNumbers - - let printOutput observable functionName = - use subscription = - Observable.subscribe - (fun output -> printfn $"{functionName} - Split output: {output}. Type: {output.GetType()}") - observable - - subscription - - printOutput evenSplit (nameof evenSplit) |> ignore - printOutput printOddNumbers (nameof printOddNumbers) |> ignore - - The sample evaluates to: evenSplit - Split output: 2. Type: System.Int32 - evenSplit - Split output: 4. Type: System.Int32 - printOddNumbers - Split output: 1 is not an even number. Type: System.String - printOddNumbers - Split output: 3 is not an even number. Type: System.String - printOddNumbers - Split output: 5 is not an even number. Type: System.String - - - - Returns two observables which partition the observations of the source by - the given function. The first will trigger observations for those values - for which the predicate returns true. The second will trigger observations - for those values where the predicate returns false. The predicate is - executed once for each subscribed observer. Both also propagate all error - observations arising from the source and each completes when the source - completes. - - The function to determine which output Observable will trigger - a particular observation. - The input Observable. - - A tuple of Observables. The first triggers when the predicate returns true, and - the second triggers when the predicate returns false. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let isEvenNumber = fun number -> number % 2 = 0 - - let leftPartition, rightPartition = - Observable.partition isEvenNumber observableNumbers - - leftPartition.Subscribe(fun x -> printfn $"Left partition: {x}") |> ignore - - rightPartition.Subscribe(fun x -> printfn $"Right partition: {x}") |> ignore - - The sample evaluates to: Left partition: 2, 4, Right partition: 1, 3, 5 - - - - Returns an observable which filters the observations of the source - by the given function. The observable will see only those observations - for which the predicate returns true. The predicate is executed once for - each subscribed observer. The returned object also propagates error - observations arising from the source and completes when the source completes. - - The function to apply to observations to determine if it should - be kept. - The input Observable. - - An Observable that filters observations based on filter. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let getEvenNumbers = fun number -> number % 2 = 0 - let map = Observable.filter multiplyByTwo observableNumbers - - map.Subscribe(fun x -> printf $"{x} ") |> ignore - - The sample will output: 2 4 - - - - Returns an observable which transforms the observations of the source by the - given function. The transformation function is executed once for each - subscribed observer. The returned object also propagates error observations - arising from the source and completes when the source completes. - The function applied to observations from the source. - The input Observable. - - An Observable of the type specified by mapping. - - - - open System.Reactive.Linq - let numbers = seq { 1..5 } - let observableNumbers = Observable.ToObservable numbers - - let multiplyByTwo = fun number -> number * 2 - let map = Observable.map multiplyByTwo observableNumbers - - map.Subscribe(fun x -> printf $"{x} ") |> ignore - - The sample will output: 2 4 6 8 10 - - - - Returns an observable for the merged observations from the sources. - The returned object propagates success and error values arising - from either source and completes when both the sources have completed. - - For each observer, the registered intermediate observing object is not - thread safe. That is, observations arising from the sources must not - be triggered concurrently on different threads. - - The first Observable. - The second Observable. - - An Observable that propagates information from both sources. - - - - open System.Reactive.Linq - open System - - let createTimer interval = - let timer = new Timers.Timer(interval) - timer.AutoReset <- true - timer.Enabled <- true - Observable.Create(fun observer -> timer.Elapsed.Subscribe(observer)) - - let observableFirstTimer = createTimer 1000 - let observableSecondTimer = createTimer 3000 - - let result = Observable.merge observableFirstTimer observableSecondTimer - - result.Subscribe(fun output -> printfn $"Output - {output.SignalTime} ") - |> ignore - - Console.ReadLine() |> ignore - - The sample will merge all events at a given interval and output it to the stream: - Output - 2/5/2022 3:49:37 AM - Output - 2/5/2022 3:49:38 AM - Output - 2/5/2022 3:49:39 AM - Output - 2/5/2022 3:49:39 AM - Output - 2/5/2022 3:49:40 AM - Output - 2/5/2022 3:49:41 AM - Output - 2/5/2022 3:49:42 AM - Output - 2/5/2022 3:49:42 AM - - - - - Contains operations for working with first class event and other observable objects. - - Events and Observables - - - - A method used to support the F# query syntax. Returns an empty sequence that has the specified type argument. - - - - - - - A method used to support the F# query syntax. Returns a sequence that contains the specified values. - - - - - - - A method used to support the F# query syntax. Returns a sequence of length one that contains the specified value. - - - - - - A query operator that selects those elements based on a specified predicate. - - - - - - A query operator that performs a subsequent ordering of the elements selected so far in descending order by the given nullable sorting key. - This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. - - - - - - A query operator that performs a subsequent ordering of the elements selected so far in ascending order by the given nullable sorting key. - This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. - - - - - - A query operator that performs a subsequent ordering of the elements selected so far in descending order by the given sorting key. - This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. - - - - - - A query operator that performs a subsequent ordering of the elements selected so far in ascending order by the given sorting key. - This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. - - - - - - A query operator that selects elements from a sequence as long as a specified condition is true, and then skips the remaining elements. - - - - - - A query operator that selects a specified number of contiguous elements from those selected so far. - - - - - - A query operator that selects a nullable value for each element selected so far and returns the sum of these values. - If any nullable does not have a value, it is ignored. - - - - - - A query operator that selects a value for each element selected so far and returns the sum of these values. - - - - - - - A method used to support the F# query syntax. Inputs to queries are implicitly wrapped by a call to one of the overloads of this method. - - - - - - - A method used to support the F# query syntax. Inputs to queries are implicitly wrapped by a call to one of the overloads of this method. - - - - - - A query operator that sorts the elements selected so far in descending order by the given nullable sorting key. - - - - - - A query operator that sorts the elements selected so far in ascending order by the given nullable sorting key. - - - - - - A query operator that sorts the elements selected so far in descending order by the given sorting key. - - - - - - A query operator that sorts the elements selected so far in ascending order by the given sorting key. - - - - - - A query operator that bypasses elements in a sequence as long as a specified condition is true and then selects the remaining elements. - - - - - - A query operator that bypasses a specified number of the elements selected so far and selects the remaining elements. - - - - - - A query operator that projects each of the elements selected so far. - - - - - - - A method used to support the F# query syntax. Runs the given quotation as a query using LINQ IQueryable rules. - - - - - - - A method used to support the F# query syntax. Indicates that the query should be passed as a quotation to the Run method. - - - - - - A query operator that selects the element at a specified index amongst those selected so far. - - - - - - A query operator that selects a nullable value for each element selected so far and returns the minimum of these values. - If any nullable does not have a value, it is ignored. - - - - - - A query operator that selects a value for each element selected so far and returns the minimum resulting value. - - - - - - A query operator that selects a nullable value for each element selected so far and returns the maximum of these values. - If any nullable does not have a value, it is ignored. - - - - - - A query operator that selects a value for each element selected so far and returns the maximum resulting value. - - - - - - A query operator that correlates two sets of selected values based on matching keys and groups the results. - If any group is empty, a group with a single default value is used instead. - Normal usage is 'leftOuterJoin y in elements2 on (key1 = key2) into group'. - - - - - - A query operator that selects the last element of those selected so far, or a default value if no element is found. - - - - - - A query operator that selects the last element of those selected so far. - - - - - - A query operator that correlates two sets of selected values based on matching keys. - Normal usage is 'join y in elements2 on (key1 = key2)'. - - - - - - A query operator that selects the first element of those selected so far, or a default value if the sequence contains no elements. - - - - - - A query operator that selects the first element from those selected so far. - - - - - - A query operator that selects a value for each element selected so far and groups the elements by the given key. - - - - - - A query operator that correlates two sets of selected values based on matching keys and groups the results. - Normal usage is 'groupJoin y in elements2 on (key1 = key2) into group'. - - - - - - A query operator that groups the elements selected so far according to a specified key selector. - - - - - - - A method used to support the F# query syntax. Projects each element of a sequence to another sequence and combines the resulting sequences into one sequence. - - - - - - A query operator that selects the first element selected so far that satisfies a specified condition. - - - - - - A query operator that determines whether any element selected so far satisfies a condition. - - - - - - A query operator that selects the single, specific element of those selected so far, or a default value if that element is not found. - - - - - - A query operator that selects the single, specific element selected so far - - - - - - A query operator that selects distinct elements from the elements selected so far. - - - - - - A query operator that returns the number of selected elements. - - - - - - A query operator that determines whether the selected elements contains a specified element. - - - - - - A query operator that selects a nullable value for each element selected so far and returns the average of these values. - If any nullable does not have a value, it is ignored. - - - - - - A query operator that selects a value for each element selected so far and returns the average of these values. - - - - - - A query operator that determines whether all elements selected so far satisfies a condition. - - - - - - Create an instance of this builder. Use 'query { ... }' to use the query syntax. - - - - The type used to support the F# query syntax. Use 'query { ... }' to use the query syntax. See - also <a href="https://learn.microsoft.com/dotnet/fsharp/language-reference/query-expressions">F# Query Expressions</a> in the F# Language Guide. - - - - - A property used to support the F# query syntax. - - - - - A method used to support the F# query syntax. - - - - - A partial input or result in an F# query. This type is used to support the F# query syntax. - - - - Library functionality for F# query syntax and interoperability with .NET LINQ Expressions. See - also F# Query Expressions in the F# Language Guide. - - - - Converts the argument to character. Numeric inputs are converted according to the UTF-16 - encoding for characters. The operation requires an appropriate static conversion method on the input type. - - The input value. - - The converted char. - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.char (Nullable<int>()) // evaluates to Nullable<char>() - Nullable.char (Nullable<int>(64)) // evaluates to Nullable<char>('@') - - - - - Converts the argument to System.Decimal using a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted decimal. - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.decimal (Nullable<int>()) // evaluates to Nullable<decimal>() - Nullable.decimal (Nullable<int>(3)) // evaluates to Nullable<decimal>(3.0M) - - - - - Converts the argument to unsigned native integer using a direct conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted unativeint - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.unativeint (Nullable<int>()) // evaluates to Nullable<unativeint>() - Nullable.unativeint (Nullable<int>(3)) // evaluates to Nullable<unativeint>(3un) - - - - - Converts the argument to signed native integer. This is a direct conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted nativeint - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.nativeint (Nullable<int>()) // evaluates to Nullable<nativeint>() - Nullable.nativeint (Nullable<int>(3)) // evaluates to Nullable<nativeint>(3n) - - - - - Converts the argument to 64-bit float. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted float - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.double (Nullable<int>()) // evaluates to Nullable<double>() - Nullable.double (Nullable<int>(3)) // evaluates to Nullable<double>(3.0) - - - - - Converts the argument to 32-bit float. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted float32 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.single (Nullable<int>()) // evaluates to Nullable<float32>() - Nullable.single (Nullable<int>(3)) // evaluates to Nullable<float32>(3.0f) - - - - - Converts the argument to 64-bit float. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted float - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.float (Nullable<int>()) // evaluates to Nullable<float>() - Nullable.float (Nullable<int>(3)) // evaluates to Nullable<float>(3.0) - - - - - Converts the argument to 32-bit float. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted float32 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.float32 (Nullable<int>()) // evaluates to Nullable<float32>() - Nullable.float32 (Nullable<int>(3)) // evaluates to Nullable<float32>(3.0f) - - - - - Converts the argument to unsigned 64-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint64 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint64 (Nullable<int>()) // evaluates to Nullable<uint64>() - Nullable.uint64 (Nullable<int>(3)) // evaluates to Nullable<uint64>(3UL) - - - - - Converts the argument to signed 64-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int64 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int64 (Nullable<int>()) // evaluates to Nullable<int64>() - Nullable.int64 (Nullable<int>(3)) // evaluates to Nullable<int64>(3L) - - - - - Converts the argument to unsigned 32-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint32 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint32 (Nullable<int>()) // evaluates to Nullable<uint32>() - Nullable.uint32 (Nullable<int>(3)) // evaluates to Nullable(3u) - - - - - Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int32 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int32 (Nullable<int64>()) // evaluates to Nullable<int32>() - Nullable.int32 (Nullable<int64>(3)) // evaluates to Nullable(3) - - - - - Converts the argument to a particular enum type. - - The input value. - - The converted enum type. - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.enum<DayOfWeek> (Nullable<int>()) // evaluates to Nullable<uint>() - Nullable.enum<DayOfWeek> (Nullable<int>(3)) // evaluates to Nullable<DayOfWeek>(Wednesday) - - - - - Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted unsigned integer - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint (Nullable<int>()) // evaluates to Nullable<uint>() - Nullable.uint (Nullable<int>(3)) // evaluates to Nullable(3u) - - - - - Converts the argument to signed 32-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int (Nullable<int64>()) // evaluates to Nullable<int>() - Nullable.int (Nullable<int64>(3)) // evaluates to Nullable(3) - - - - - Converts the argument to unsigned 16-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint16 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint16 (Nullable<int>()) // evaluates to Nullable<uint16>() - Nullable.uint16 (Nullable<int>(3)) // evaluates to Nullable(3us) - - - - - Converts the argument to signed 16-bit integer. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int16 - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int16 (Nullable<int>()) // evaluates to Nullable<int16>() - Nullable.int16 (Nullable<int>(3)) // evaluates to Nullable(3s) - - - - - Converts the argument to signed byte. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted sbyte - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.int8 (Nullable<int>()) // evaluates to Nullable<sbyte>() - Nullable.int8 (Nullable<int>(3)) // evaluates to Nullable(3y) - - - - - Converts the argument to signed byte. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted sbyte - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.sbyte (Nullable<int>()) // evaluates to Nullable<sbyte>() - Nullable.sbyte (Nullable<int>(3)) // evaluates to Nullable(3y) - - - - - Converts the argument to byte. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted byte - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.uint8 (Nullable<int>()) // evaluates to Nullable<byte>() - Nullable.uint8 (Nullable<int>(3)) // evaluates to Nullable(3uy) - - - - - Converts the argument to byte. This is a direct conversion for all - primitive numeric types. The operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted byte - - - - open System - open FSharp.Linq.NullableOperators - - Nullable.byte (Nullable<int>()) // evaluates to Nullable<byte>() - Nullable.byte (Nullable<int>(3)) // evaluates to Nullable(3uy) - - - - - - - Functions for converting nullable values - - - - The division operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The division operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The division operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The modulus operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The modulus operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The modulus operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The multiplication operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The multiplication operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The multiplication operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The subtraction operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The subtraction operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The subtraction operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The addition operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The addition operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The addition operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<>' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '=' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<=' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '>' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '>=' operator where a nullable value appears on both left and right sides - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<>' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '=' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<=' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '>' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '>=' operator where a nullable value appears on the right - - This operator is primarily for use in F# queries - - See the other operators in this module for related examples. - - - The '<>' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?<>= 4 // true - Nullable(4) ?<>= 4 // false - Nullable() ?<> 4 // true - - - - - - The '=' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?= 4 // false - Nullable(4) ?= 4 // true - Nullable() ?= 4 // false - - - - - - The '<' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?< 4 // true - Nullable(4) ?< 4 // false - Nullable() ?< 4 // false - - - - - The '<=' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?<= 4 // true - Nullable(5) ?<= 4 // false - Nullable() ?<= 4 // false - - - - - The '>' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?> 4 // false - Nullable(5) ?> 4 // true - Nullable() ?> 4 // false - - - - - - The '>=' operator where a nullable value appears on the left - - This operator is primarily for use in F# queries - - - - open FSharp.Linq.NullableOperators - - Nullable(3) ?>= 4 // false - Nullable(4) ?>= 4 // true - Nullable() ?>= 4 // false - - - - - - - Operators for working with nullable values, primarily used on F# queries. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - This type shouldn't be used directly from user code. - - - - - A type used to reconstruct a grouping after applying a mutable->immutable mapping transformation - on a result of a query. - - - - - A runtime helper used to evaluate nested quotation literals. - - - - - - - A runtime helper used to evaluate nested quotation literals. - - - - - - - Evaluates a subset of F# quotations by first converting to a LINQ expression, for the subset of LINQ expressions represented by the - expression syntax in the C# language. - - - - - - - Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the - expression syntax in the C# language. - - - - - - - Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the - expression syntax in the C# language. - - - - - - - When used in a quotation, this function indicates a specific conversion - should be performed when converting the quotation to a LINQ expression. - - This function should not be called directly. - - - - - When used in a quotation, this function indicates a specific conversion - should be performed when converting the quotation to a LINQ expression. - - This function should not be called directly. - - - - - When used in a quotation, this function indicates a specific conversion - should be performed when converting the quotation to a LINQ expression. - - This function should not be called directly. - - - - - Contains functionality to convert F# quotations to LINQ expression trees. - - - - Library functionality associated with converting F# quotations to .NET LINQ expression trees. - - - - - The generic MethodInfo for Select function - Describes how we got from productions of immutable objects to productions of anonymous objects, with enough information - that we can invert the process in final query results. - - - - - Given the expression part of a "yield" or "select" which produces a result in terms of immutable tuples or immutable records, - generate an equivalent expression yielding anonymous objects. Also return the conversion for the immutable-to-mutable correspondence - so we can reverse this later. - - - - - Simplify gets of tuples and gets of record fields. - - - - - Cleanup the use of property-set object constructions in leaf expressions that form parts of F# queries. - - - - - Given an type involving immutable tuples and records, logically corresponding to the type produced at a - "yield" or "select", convert it to a type involving anonymous objects according to the conversion data. - - - - - Recognize anonymous type construction written using 'new AnonymousObject(<e1>, <e2>, ...)' - - - - - Recognize object construction written using 'new O(Prop1 = <e>, Prop2 = <e>, ...)' - - - - - Tests whether a list consists only of assignments of properties of the - given variable, null values (ignored) and ends by returning the given variable - (pattern returns only property assignments) - - - - - Recognize sequential series written as (... ((<e>; <e>); <e>); ...) - - - - - A method used to support the F# query syntax. Runs the given quotation as a query using LINQ IEnumerable rules. - - - - - A module used to support the F# query syntax. - - - - - A method used to support the F# query syntax. Runs the given quotation as a query using LINQ rules. - - - - - A module used to support the F# query syntax. - - - - Contains modules used to support the F# query syntax. - - - - - A synonym for henry, the SI unit of inductance - - - - - A synonym for katal, the SI unit of catalytic activity - - - - - A synonym for sievert, the SI unit of does equivalent - - - - - A synonym for gray, the SI unit of absorbed dose - - - - - A synonym for becquerel, the SI unit of activity referred to a radionuclide - - - - - A synonym for lux, the SI unit of illuminance - - - - - A synonym for lumen, the SI unit of luminous flux - - - - - A synonym for tesla, the SI unit of magnetic flux density - - - - - A synonym for weber, the SI unit of magnetic flux - - - - - A synonym for UnitNames.ohm, the SI unit of electric resistance. - - - - - A synonym for siemens, the SI unit of electric conductance - - - - - A synonym for farad, the SI unit of capacitance - - - - - A synonym for volt, the SI unit of electric potential difference, electromotive force - - - - - A synonym for coulomb, the SI unit of electric charge, amount of electricity - - - - - A synonym for watt, the SI unit of power, radiant flux - - - - - A synonym for joule, the SI unit of energy, work, amount of heat - - - - - A synonym for pascal, the SI unit of pressure, stress - - - - - A synonym for newton, the SI unit of force - - - - - A synonym for hertz, the SI unit of frequency - - - - - A synonym for candela, the SI unit of luminous intensity - - - - - A synonym for mole, the SI unit of amount of substance - - - - - A synonym for kelvin, the SI unit of thermodynamic temperature - - - - - A synonym for ampere, the SI unit of electric current - - - - - A synonym for second, the SI unit of time - - - - - A synonym for kilogram, the SI unit of mass - - - - - A synonym for Metre, the SI unit of length - - - - - The SI unit of catalytic activity - - - - - The SI unit of does equivalent - - - - - The SI unit of absorbed dose - - - - - The SI unit of activity referred to a radionuclide - - - - - The SI unit of illuminance - - - - - The SI unit of luminous flux - - - - - The SI unit of inductance - - - - - The SI unit of magnetic flux density - - - - - The SI unit of magnetic flux - - - - - The SI unit of electric conductance - - - - - The SI unit of electric resistance - - - - - The SI unit of capacitance - - - - - The SI unit of electric potential difference, electromotive force - - - - - The SI unit of electric charge, amount of electricity - - - - - The SI unit of power, radiant flux - - - - - The SI unit of energy, work, amount of heat - - - - - The SI unit of pressure, stress - - - - - The SI unit of force - - - - - The SI unit of frequency - - - - - The SI unit of luminous intensity - - - - - The SI unit of amount of substance - - - - - The SI unit of thermodynamic temperature - - - - - The SI unit of electric current - - - - - The SI unit of time - - - - - The SI unit of mass - - - - - The SI unit of length - - - - - The SI unit of length - - - - Represents an Common IL (Intermediate Language) Signature Pointer. - - This type should only be used when writing F# code that interoperates - with other .NET languages that use generic Common IL Signature Pointers. - Use of this type in F# code may result in unverifiable code being generated. - Because of the rules of Common IL Signature Pointers, you cannot use this type in generic type parameters, - resulting in compiler errors. As a result, you should convert this type to - for use in F#. Note that Common IL Signature Pointers exposed by other .NET languages are converted to - or automatically by F#, - and F# also shows generic-specialized typed native pointers correctly to other .NET languages as Common IL Signature Pointers. - However, generic typed native pointers are shown as to other .NET languages. - For other languages to interpret generic F# typed native pointers correctly, you should expose this type or - instead of . - Values of this type can be generated by the functions in the NativeInterop.NativePtr module. - - ByRef and Pointer Types - - - Represents an untyped 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 - type may be required. Values of this type can be generated - by the functions in the NativeInterop.NativePtr module. - - ByRef and Pointer Types - - - 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 - type may be required. Values of this type can be generated - by the functions in the NativeInterop.NativePtr module. - - ByRef and Pointer Types - - - Single dimensional, zero-based arrays, written int[], string[] etc. - - Use the values in the module to manipulate values - of this type, or the notation arr.[x] to get/set array - values. - - Basic Types - - - Thirty-two dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Thirty-one dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Thirty dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-nine dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-eight dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-seven dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-six dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-five dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-four dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-three dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-two dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty-one dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twenty dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Nineteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Eighteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Seventeen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Sixteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Fifteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Fourteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Thirteen dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Twelve dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Eleven dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Ten dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Nine dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Eight dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Seven dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Six dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - Five dimensional arrays, typically zero-based. Non-zero-based arrays - can be created using methods on the System.Array type. - - Basic Types - - - - 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. - - Basic Types - - - - 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. - - Basic Types - - - - 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. - - Basic Types - - - - 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. - - Basic Types - - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . Identical to . - - Basic Types - - - An abbreviation for the CLI type . Identical to . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - An abbreviation for the CLI type . - - Basic Types - - - - Represents an Error or a Failure. The code failed with a value of 'TError representing what went wrong. - - - - - Represents an OK or a Successful result. The code succeeded with a value of 'T. - - - - Helper type for error handling without exceptions. - - Choices and Results - - - The type of optional values, represented as structs. - - Use the constructors ValueSome and ValueNone to create values of this type. - Use the values in the ValueOption module to manipulate values of this type, - or pattern match against the values directly. - - Options - - - The representation of "Value of type 'T" - - The input value. - - An option representing the value. - - - The representation of "No value" - - - Implicitly converts a value into an optional that is a 'ValueSome' value. - - The input value - - The F# compiler ignored this method when determining possible type-directed conversions. Instead, use Some or None explicitly. - - A voption representing the value. - - - - Get the value of a 'ValueSome' option. An InvalidOperationException is raised if the option is 'ValueNone'. - - - Create a value option value that is a 'ValueNone' value. - - - - Return 'true' if the value option is a 'ValueSome' value. - - - Return 'true' if the value option is a 'ValueNone' value. - - - Create a value option value that is a 'Some' value. - - The input value - - A value option representing the value. - - - - The type of optional values, represented as structs. - - Use the constructors ValueSome and ValueNone to create values of this type. - Use the values in the ValueOption module to manipulate values of this type, - or pattern match against the values directly. - - Options - - - - The type of optional values. When used from other CLI 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 CLI languages. - Instance methods on this type will appear as static methods to other CLI languages - due to the use of null as a value representation. - - Options - - - The representation of "Value of type 'T" - - The input value. - - An option representing the value. - - - The representation of "No value" - - - Implicitly converts a value into an optional that is a 'Some' value. - - The input value - - The F# compiler ignored this method when determining possible type-directed conversions. Instead, use Some or None explicitly. - - An option representing the value. - - - - 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 input value - - An option representing the value. - - - - The type of optional values. When used from other CLI 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 CLI languages. - Instance methods on this type will appear as static methods to other CLI languages - due to the use of null as a value representation. - - Options - - - - The type of mutable references. Use the functions [!] and [:=] to get and - set values of this type. - Basic Types - - - - The current value of the reference cell - - - - 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. - - Basic Types - - - - Convert the given Converter delegate object to an F# function value - - The input Converter delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - A utility function to convert function values from tupled to curried form - - The input tupled function. - - The output curried function. - - - A utility function to convert function values from tupled to curried form - - The input tupled function. - - The output curried function. - - - A utility function to convert function values from tupled to curried form - - The input tupled function. - - The output curried function. - - - A utility function to convert function values from tupled to curried form - - The input tupled function. - - The output curried function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F#funcfunction. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Func delegate object to an F# function value - - The input Func delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F#funcfunction. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Convert the given Action delegate object to an F# function value - - The input Action delegate. - - The F# function. - - - Helper functions for converting F# first class function values to and from CLI representations - of functions using delegates. - Language Primitives - - - Convert an value of type to a F# first class function value - - The input System.Converter. - - An F# function of the same type. - - - Convert an F# first class function value to a value of type - - The input function. - - A System.Converter of the function type. - - - Convert an F# first class function value to a value of type - - The input function. - - System.Converter<'T,'U> - - - 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. - - The input function. - The first arg. - The second arg. - - The function result. - - - 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. - - The input function. - The first arg. - The second arg. - The third arg. - - The function result. - - - 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. - - The input function. - The first arg. - The second arg. - The third arg. - The fourth arg. - - The function 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. - - The input function. - The first arg. - The second arg. - The third arg. - The fourth arg. - The fifth arg. - - The function result. - - - Invoke an F# first class function value with one argument - - - - 'U - - - Convert an value of type to a F# first class function value - - The input System.Converter. - - An F# function of the same type. - - - Construct an instance of an F# first class function value - The created F# function. - - - The CLI type used to represent F# function values. This type is not - typically used directly, though may be used from other CLI languages. - Language Primitives - - - Specialize the type function at a given type - The specialized type. - - - Construct an instance of an F# first class type function value - FSharpTypeFunc - - - The CLI type used to represent F# first-class type function values. This type is for use - by compiled F# code. - Language Primitives - - - Choice 7 of 7 choices - - - Choice 6 of 7 choices - - - Choice 5 of 7 choices - - - Choice 4 of 7 choices - - - Choice 3 of 7 choices - - - Choice 2 of 7 choices - - - Choice 1 of 7 choices - - - Helper types for active patterns with 7 choices. - Choices and Results - - - Choice 6 of 6 choices - - - Choice 5 of 6 choices - - - Choice 4 of 6 choices - - - Choice 3 of 6 choices - - - Choice 2 of 6 choices - - - Choice 1 of 6 choices - - - Helper types for active patterns with 6 choices. - Choices and Results - - - Choice 5 of 5 choices - - - Choice 4 of 5 choices - - - Choice 3 of 5 choices - - - Choice 2 of 5 choices - - - Choice 1 of 5 choices - - - Helper types for active patterns with 5 choices. - Choices and Results - - - Choice 4 of 4 choices - - - Choice 3 of 4 choices - - - Choice 2 of 4 choices - - - Choice 1 of 4 choices - - - Helper types for active patterns with 4 choices. - Choices and Results - - - Choice 3 of 3 choices - - - Choice 2 of 3 choices - - - Choice 1 of 3 choices - - - Helper types for active patterns with 3 choices. - Choices and Results - - - Choice 2 of 2 choices - - - Choice 1 of 2 choices - - - Helper types for active patterns with 2 choices. - Choices and Results - - - Represents a out-argument managed pointer in F# code. This type should only be used with F# 4.5+. - ByRef and Pointer Types - - - Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+. - ByRef and Pointer Types - - - Represents a managed pointer in F# code. For F# 4.5+ this is considered equivalent to byref<'T, ByRefKinds.InOut> - ByRef and Pointer Types - - - Represents a managed pointer in F# code. - ByRef and Pointer Types - - - The type of 32-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 8-bit unsigned 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - The type of single-precision 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 - . - - Basic Types with Units of Measure - - - The type of double-precision 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 - . - - Basic Types with Units of Measure - - - The type of machine-sized unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 64-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 16-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 8-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of 32-bit unsigned 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 - . - - Basic Types with Units of Measure - - - The type of machine-sized 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - 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 - . - - Basic Types with Units of Measure - - - The type of single-precision 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 - . - - - Basic Types with Units of Measure - - - The type of double-precision 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 - . - - Basic Types with Units of Measure - - - Indicates a function that should be called in a tail recursive way inside its recursive scope. - A warning is emitted if the function is analyzed as not tail recursive after the optimization phase. - - Attributes - - - - let mul x y = x * y - [<TailCall>] - let rec fact n acc = - if n = 0 - then acc - else (fact (n - 1) (mul n acc)) + 23 // warning because of the addition after the call to fact - - - - - Creates an instance of the attribute - NoCompilerInliningAttribute - - - Indicates a value or a function that must not be inlined by the F# compiler, - but may be inlined by the JIT compiler. - - Attributes - - - Indicates the namespace or module to be automatically opened when an assembly is referenced - or an enclosing module opened. - - - Creates an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced - - The namespace or module to be automatically opened when an assembly is referenced - or an enclosing module opened. - - AutoOpenAttribute - - - Creates an attribute used to mark a module as 'automatically opened' when the enclosing namespace is opened - AutoOpenAttribute - - - Indicates a construct is automatically opened when brought into scope through - an assembly reference or then opening of the containing namespace or module. - - When applied to an assembly, this attribute must be given a string - argument, and this indicates 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 opened. - - When applied to a type or module within an assembly, then the attribute must not be given any arguments, and - the type or module is implicitly opened when its enclosing namespace or module is opened. - - - Attributes - - - Creates an instance of the attribute - RequireQualifiedAccessAttribute - - - This attribute is used to indicate that references to the elements of a module, record or union - type require explicit qualified access. - - Attributes - - - Creates an instance of the attribute - NoDynamicInvocationAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - UnverifiableAttribute - - - 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. - - Attributes - - - Indicates if the construct should always be hidden in an editing environment. - - - Indicates if the message should indicate a compiler error. Error numbers less than - 10000 are considered reserved for use by the F# compiler and libraries. - - - Indicates the number associated with the message. - - - Indicates the warning message to be emitted when F# source code uses this construct - - - Indicates if the construct should always be hidden in an editing environment. - - - Indicates if the message should indicate a compiler error. Error numbers less than - 10000 are considered reserved for use by the F# compiler and libraries. - - - Creates an instance of the attribute. - - - Indicates that a message should be emitted when F# source code uses this construct. - - Attributes - - - 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. - - - Creates an instance of the attribute - - Indicates the text to display when using the '%A' printf formatting. - - StructuredFormatDisplayAttribute - - - 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# valid values are of the form PreText {PropertyName1} PostText {PropertyName2} ... {PropertyNameX} PostText. - The property names indicate properties to evaluate and to display instead of the object itself. - - Attributes - - - Indicates the number of arguments in each argument group - - - Creates an instance of the attribute - - Indicates the number of arguments in each argument group. - - CompilationArgumentCountsAttribute - - - This attribute is generated automatically by the F# compiler to tag functions and members - that accept a partial application of some of their arguments and return a residual function. - - - Attributes - - - Creates an instance of the attribute - InlineIfLambdaAttribute - - - Adding this attribute to a parameter of function type indicates that, if the overall function or method is inlined and the parameter is - determined to be a known lambda, then this function should be statically inlined throughout the body of the function of method. - - If the function parameter is called multiple times in the implementation of the function or method this attribute may cause code explosion and slow compilation times. - - Attributes - - - Indicates the warning message to be emitted when F# source code uses this construct - - - Creates an instance of the attribute - - The warning message to be emitted when code uses this construct. - - ExperimentalAttribute - - - This attribute is used to tag values that are part of an experimental library - feature. - - Attributes - - - Indicates one or more adjustments to the compiled representation of an F# type or member - - - Creates an instance of the attribute - - Indicates adjustments to the compiled representation of the type or member. - - CompilationRepresentationAttribute - - - 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. - - - Attributes - - - Indicates the name of the entity in F# source code - - - Creates an instance of the attribute - - The name of the method in source. - - CompilationSourceNameAttribute - - - This attribute is inserted automatically by the F# compiler to tag - methods which are given the 'CompiledName' attribute. - - This attribute is used by the functions in the - FSharp.Reflection namespace to reverse-map compiled constructs to - their original forms. It is not intended for use from user code. - - - Attributes - - - Indicates the variant number of the entity, if any, in a linear sequence of elements with F# source code - - - Indicates the type definitions needed to resolve the source construct - - - 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 - - - Indicates the resource the source construct relates to - - - Creates an instance of the attribute - - Indicates the type definitions needed to resolve the source construct. - The name of the resource needed to resolve the source construct. - - CompilationMappingAttribute - - - Creates an instance of the attribute - - Indicates the type of source construct. - Indicates the index in the sequence of variants. - Indicates the index in the sequence of constructs. - - CompilationMappingAttribute - - - Creates an instance of the attribute - - Indicates the type of source construct. - Indicates the index in the sequence of constructs. - - CompilationMappingAttribute - - - Creates an instance of the attribute - - Indicates the type of source construct. - - CompilationMappingAttribute - - - This attribute is inserted automatically by the F# compiler to tag types - and methods in the generated CLI code with flags indicating the correspondence - with original source constructs. - - This attribute is used by the functions in the - FSharp.Reflection namespace to reverse-map compiled constructs to - their original forms. It is not intended for use from user code. - - Attributes - - - 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 - - - Creates an instance of the attribute - - The major version number. - The minor version number. - The release number. - - FSharpInterfaceDataVersionAttribute - - - 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. - - Attributes - - - The value of the attribute, indicating whether the type is automatically marked serializable or not - - - Creates an instance of the attribute - - Indicates whether the type should be serializable by default. - - AutoSerializableAttribute - - - Adding this attribute to a type with value 'false' disables the behaviour where F# makes the - type Serializable by default. - - Attributes - - - The name of the value as it appears in compiled code - - - Creates an instance of the attribute - - The name to use in compiled code. - - CompiledNameAttribute - - - Adding this attribute to a value or function definition in an F# module changes the name used - for the value in compiled CLI code. - - Attributes - - - Creates an instance of the attribute - GeneralizableValueAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - RequiresExplicitTypeArgumentsAttribute - - - Adding this attribute to a type, value or member requires that - uses of the construct must explicitly instantiate any generic type parameters. - - Attributes - - - Creates an instance of the attribute - OptionalArgumentAttribute - - - This attribute is added automatically for all optional arguments. - - Attributes - - - Indicates if a constraint is asserted that the field type supports 'null' - - - Creates an instance of the attribute - - Indicates whether to assert that the field type supports null. - - DefaultValueAttribute - - - Creates an instance of the attribute - DefaultValueAttribute - - - 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. - - - Attributes - - - Creates an instance of the attribute - NoComparisonAttribute - - - Adding this attribute to a type indicates it is a type where comparison is an abnormal operation. - This means that the type does not satisfy the F# 'comparison' constraint. Within the bounds of the - F# type system, this helps ensure that the F# generic comparison function is not instantiated directly - at this type. The attribute and checking does not constrain the use of comparison with base or child - types of this type. - - - Attributes - - - Creates an instance of the attribute - CustomComparisonAttribute - - - Adding this attribute to a type indicates it is a type with a user-defined implementation of comparison. - - Attributes - - - Creates an instance of the attribute - CustomEqualityAttribute - - - Adding this attribute to a type indicates it is a type with a user-defined implementation of equality. - - Attributes - - - Creates an instance of the attribute - NoEqualityAttribute - - - Adding this attribute to a type indicates it is a type where equality is an abnormal operation. - This means that the type does not satisfy the F# 'equality' constraint. Within the bounds of the - F# type system, this helps ensure that the F# generic equality function is not instantiated directly - at this type. The attribute and checking does not constrain the use of comparison with base or child - types of this type. - - Attributes - - - Creates an instance of the attribute - ProjectionParameterAttribute - - - Indicates that, when a custom operator is used in a computation expression, - a parameter is automatically parameterized by the variable space of the computation expression - - Attributes - - - Indicates if the custom operation maintains the variable space of the query of computation expression through the use of a bind operation - - - Indicates if the custom operation maintains the variable space of the query of computation expression - - - Indicates the name used for the 'on' part of the custom query operator for join-like operators - - - Indicates if the custom operation is an operation similar to a zip in a sequence computation, supporting two inputs - - - Indicates if the custom operation is an operation similar to a join in a sequence computation, supporting two inputs and a correlation constraint - - - Indicates if the custom operation is an operation similar to a group join in a sequence computation, supporting two inputs and a correlation constraint, and generating a group - - - Indicates if the custom operation supports the use of 'into' immediately after the use of the operation in a query or other computation expression to consume the results of the operation - - - Get the name of the custom operation when used in a query or other computation expression - - - Indicates if the custom operation maintains the variable space of the query of computation expression through the use of a bind operation - - - Indicates if the custom operation maintains the variable space of the query of computation expression - - - Indicates the name used for the 'on' part of the custom query operator for join-like operators - - - Indicates if the custom operation is an operation similar to a zip in a sequence computation, supporting two inputs - - - Indicates if the custom operation is an operation similar to a join in a sequence computation, supporting two inputs and a correlation constraint - - - Indicates if the custom operation is an operation similar to a group join in a sequence computation, supporting two inputs and a correlation constraint, and generating a group - - - Indicates if the custom operation supports the use of 'into' immediately after the use of the operation in a query or other computation expression to consume the results of the operation - - - Creates an instance of the attribute - CustomOperationAttribute - - - Indicates that a member on a computation builder type is a custom query operator, - and indicates the name of that operator. - - Attributes - - - Creates an instance of the attribute - StructuralComparisonAttribute - - - Adding this attribute to a record, union, exception, or struct type confirms the - automatic generation of implementations for 'System.IComparable' for the type. - - Attributes - - - Creates an instance of the attribute - StructuralEqualityAttribute - - - Adding this attribute to a record, union or struct type confirms the automatic - generation of overrides for 'System.Object.Equals(obj)' and - 'System.Object.GetHashCode()' for the type. - - Attributes - - - Creates an instance of the attribute - ReferenceEqualityAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - EntryPointAttribute - - - Adding this attribute to a function indicates it is the entrypoint for an application. - If this attribute is not specified for an EXE then the initialization implicit in the - module bindings in the last file in the compilation sequence are used as the entrypoint. - - Attributes - - - Creates an instance of the attribute - VolatileFieldAttribute - - - Adding this attribute to an F# mutable binding causes the "volatile" - prefix to be used for all accesses to the field. - - Attributes - - - The value of the attribute, indicating whether the type has a default augmentation or not - - - Creates an instance of the attribute - - Indicates whether to generate helper members on the CLI class representing a discriminated - union. - - DefaultAugmentationAttribute - - - 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 CLI class for that type. - - Attributes - - - Creates an instance of the attribute - CLIMutableAttribute - - - Adding this attribute to a record type causes it to be compiled to a CLI representation - with a default constructor with property getters and setters. - - Attributes - - - Creates an instance of the attribute - CLIEventAttribute - - - Adding this attribute to a property with event type causes it to be compiled with as a CLI - metadata event, through a syntactic translation to a pair of 'add_EventName' and - 'remove_EventName' methods. - - Attributes - - - Creates an instance of the attribute - LiteralAttribute - - - Adding this attribute to a value causes it to be compiled as a CLI constant literal. - - Attributes - - - The value of the attribute, indicating whether the type allows the null literal or not - - - Creates an instance of the attribute with the specified value - AllowNullLiteralAttribute - - - Creates an instance of the attribute - AllowNullLiteralAttribute - - - Adding this attribute to a type lets the 'null' literal be used for the type - within F# code. This attribute may only be added to F#-defined class or - interface types. - - Attributes - - - Creates an instance of the attribute - ClassAttribute - - - Adding this attribute to a type causes it to be represented using a CLI class. - - Attributes - - - Creates an instance of the attribute - InterfaceAttribute - - - Adding this attribute to a type causes it to be represented using a CLI interface. - - Attributes - - - Creates an instance of the attribute - MeasureAnnotatedAbbreviationAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - MeasureAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - StructAttribute - - - Adding this attribute to a type causes it to be represented using a CLI struct. - - Attributes - - - Creates an instance of the attribute - ComparisonConditionalOnAttribute - - - This attribute is used to indicate a generic container type satisfies the F# 'comparison' - constraint only if a generic argument also satisfies this constraint. - - For example, adding - this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports - comparison if the type X also supports comparison and all other conditions for C<X> to support - comparison are also met. The type C<'T> can still be used with other type arguments, but a type such - as C<(int -> int)> will not support comparison because the type (int -> int) is an F# function type - and does not support comparison. - - This attribute will be ignored if it is used on the generic parameters of functions or methods. - - - Attributes - - - Creates an instance of the attribute - EqualityConditionalOnAttribute - - - This attribute is used to indicate a generic container type satisfies the F# 'equality' - constraint only if a generic argument also satisfies this constraint. - - - - For example, adding - this attribute to parameter 'T on a type definition C<'T> means that a type C<X> only supports - equality if the type X also supports equality and all other conditions for C<X> to support - equality are also met. The type C<'T> can still be used with other type arguments, but a type such - as C<(int -> int)> will not support equality because the type (int -> int) is an F# function type - and does not support equality. - - This attribute will be ignored if it is used on the generic parameters of functions or methods. - - - Attributes - - - The value of the attribute, indicating whether to include the evaluated value of the definition as the outer node of the quotation - - - Creates an instance of the attribute - - Indicates whether to include the evaluated value of the definition as the outer node of the quotation - - ReflectedDefinitionAttribute - - - Creates an instance of the attribute - ReflectedDefinitionAttribute - - - 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. - - Attributes - - - Creates an instance of the attribute - AbstractClassAttribute - - - 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. - - Attributes - - - The value of the attribute, indicating whether the type is sealed or not. - - - Creates an instance of the attribute - - Indicates whether the class is sealed. - - SealedAttribute - - - Creates an instance of the attribute. - The created attribute. - - - Adding this attribute to class definition makes it sealed, which means it may not - be extended or implemented. - - Attributes - - - Compile a property as a CLI event. - - - Permit the use of null as a representation for nullary discriminators in a discriminated union. - - - append 'Module' to the end of a module whose name clashes with a type name in the same namespace. - - - Compile a member as 'instance' even if null is used as a representation for this type. - - - Compile an instance member as 'static' . - - - No special compilation representation. - - - Indicates one or more adjustments to the compiled representation of an F# type or member. - - Attributes - - - Indicates that the compiled entity had private or internal representation in F# source code. - - - The mask of values related to the kind of the compiled entity. - - - Indicates that the compiled entity is part of the representation of an F# value declaration. - - - Indicates that the compiled entity is part of the representation of an F# union case declaration. - - - Indicates that the compiled entity is part of the representation of an F# module declaration. - - - Indicates that the compiled entity is part of the representation of an F# closure. - - - Indicates that the compiled entity is part of the representation of an F# exception declaration. - - - Indicates that the compiled entity is part of the representation of an F# record or union case field declaration. - - - Indicates that the compiled entity is part of the representation of an F# class or other object type declaration. - - - Indicates that the compiled entity is part of the representation of an F# record type declaration. - - - Indicates that the compiled entity is part of the representation of an F# union type declaration. - - - Indicates that the compiled entity has no relationship to an element in F# source code. - - - Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code. - - Attributes - - - The type 'unit', which has only one value "()". This value is special and - always uses the representation 'null'. - - Basic Types - - - - Basic definitions of operators, options, functions, results, choices, attributes and plain text formatting. - - - The type 'unit', which has only one value "()". This value is special and - always uses the representation 'null'. - - Basic Types - - - - An abbreviation for . - - Basic Types - - - Type of a formatting expression. - Function type generated by printf. - Type argument passed to %a formatters - Value generated by the overall printf action (e.g. sprint generates a string) - Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - Tuple of values generated by scan or match. - - Language Primitives - - - Type of a formatting expression. - Function type generated by printf. - Type argument passed to %a formatters - Value generated by the overall printf action (e.g. sprint generates a string) - Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - - Language Primitives - - - Construct a format string - - The input string. - The captured expressions in an interpolated string. - The types of expressions for %A expression gaps in interpolated string. - - The created format string. - - - Construct a format string - - The input string. - - The created format string. - - - Type of a formatting expression. - - Function type generated by printf. - Type argument passed to %a formatters - Value generated by the overall printf action (e.g. sprint generates a string) - Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - Tuple of values generated by scan or match. - - Language Primitives - - - The raw text of the format string. - - - The captures associated with an interpolated string. - - - The capture types associated with an interpolated string. - - - Construct a format string - The input string. - The captured expressions in an interpolated string. - The types of expressions for %A expression gaps in interpolated string. - The PrintfFormat containing the formatted result. - - - Construct a format string - The input string. - - The PrintfFormat containing the formatted result. - - - Type of a formatting expression. - - Function type generated by printf. - Type argument passed to %a formatters - Value generated by the overall printf action (e.g. sprint generates a string) - Value generated after post processing (e.g. failwithf generates a string internally then raises an exception) - - Language Primitives - - - Non-exhaustive match failures will raise the MatchFailureException exception - Language Primitives - - - maxDegreeOfParallelism must be positive, was {0} - - - This is not a valid query expression. The construct '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. - - - This is not a valid query expression. The property '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression. - - - This is not a valid query expression. The method '{0}' was used in a query but is not recognized by the F#-to-LINQ query translator. Check the specification of permitted queries and consider moving some of the operations out of the query expression - - - This is not a valid query expression. The following construct was used in a query but is not recognized by the F#-to-LINQ query translator:\n{0}\nCheck the specification of permitted queries and consider moving some of the operations out of the query expression. - - - An if/then/else conditional or pattern matching expression with multiple branches is not permitted in a query. An if/then/else conditional may be used. - - - Unrecognized use of a 'sumBy' or 'averageBy' operator in a query. In queries whose original data is of static type IQueryable, these operators may only be used with result type int32, int64, single, double or decimal - - - 'thenBy' and 'thenByDescending' may only be used with an ordered input - - - The input sequence contains more than one element. - - - The tuple type '{0}' is invalid. Required constructor is not defined. - - - The record type '{0}' is invalid. Required constructor is not defined. - - - A continuation provided by Async.FromContinuations was invoked multiple times - - - The option value was None - - - This value cannot be mutated - - - type argument out of range - - - ill formed expression: AppOp or LetOp - - - Failed to bind assembly '{0}' while processing quotation data - - - Cannot take the address of this quotation - - - Could not bind to method - - - Could not bind property {0} in type {1} - - - Could not bind function {0} in type {1} - - - Bad format specifier (width) - - - Bad format specifier (after {0}) - - - Bad format specifier (precision) - - - Not a function type - - - Missing format specifier - - - The # formatting modifier is invalid in F# - - - Expected a width argument - - - Expected a precision argument - - - Bad integer supplied to dynamic formatter - - - Bad format specifier:{0} - - - Bad float value - - - Multiple CompilationMappingAttributes, expected at most one - - - MoveNext not called, or finished - - - first class uses of '%' or '%%' are not permitted - - - The constructor method '{0}' for the union case could not be found - - - An index satisfying the predicate was not found in the collection. - - - The method '{0}' expects {1} type arguments but {2} were provided - - - Writing a get-only property - - - F# union type requires different number of arguments - - - The tuple lengths are different - - - Tuple access out of range - - - Type mismatch when splicing expression into quotation literal. The type of the expression tree being inserted doesn't match the type expected by the splicing operation. Expected '{0}', but received type '{1}'. Consider type-annotating with the expected expression type, e.g., (%% x : {0}) or (%x : {0}). - - - Type mismatch when building '{0}': function type doesn't match delegate type. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': the expression has the wrong type. Expected '{1}', but received type '{2}'. - - - Receiver object was unexpected, as member is static - - - Reading a set-only property - - - Parent type cannot be null - - - The member is non-static (instance), but no receiver object was supplied - - - Invalid function type - - - Incorrect type - - - Incorrect number of arguments - - - Incorrect instance type - - - Incompatible record length - - - Failed to bind type '{0}' in assembly '{1}' - - - Failed to bind property '{0}' - - - Failed to bind field '{0}' - - - Failed to bind constructor - - - The tuple index '{1}' was out of range for tuple type '{0}'. - - - The System.Threading.SynchronizationContext.Current of the calling thread is null. - - - The step of a range cannot be zero. - - - The step of a range cannot be NaN. - - - The start of a range cannot be NaN. - - - Reset is not supported on this enumerator. - - - The parameter is not a recognized method name. - - - Unexpected quotation hole in expression. - - - Type mismatch when building '{0}': the variable type doesn't match the type of the right-hand-side of a let binding. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': mismatched type of argument and tuple element. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': types of true and false branches differ. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': lower and upper bounds must be integers. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': body of the for loop must be lambda taking integer as an argument. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': invalid parameter for a method or indexer property. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': initializer doesn't match array type. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': incorrect argument type for an F# union. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': incorrect argument type for an F# record. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': guard must return boolean. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': function argument type doesn't match. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': types of expression does not match. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': expression doesn't match the tuple type. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': expected function type in function application or let binding. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': condition expression must be of type bool. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': body must return unit. Expected '{1}', but received type '{2}'. - - - Type mismatch when building '{0}': the type of the field was incorrect. Expected '{1}', but received type '{2}'. - - - Type '{0}' did not have an F# union case named '{1}'. - - - Type '{0}' did not have an F# record field named '{1}'. - - - Not a valid F# union case index. - - - Expected exactly two type arguments. - - - Expected exactly one type argument. - - - The type '{0}' is an F# union type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. - - - The type '{0}' is an F# record type but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. - - - The type '{0}' is the representation of an F# exception declaration but its representation is private. You must specify BindingFlags.NonPublic to access private type representations. - - - The index is outside the legal range. - - - The object is null and no type was given. Either pass a non-null object or a non-null type parameter. - - - The object is not an F# record value. - - - One of the elements in the array is null. - - - This object is for recursive equality calls and cannot be used for hashing. - - - The input sequence has an insufficient number of elements. - - - The two objects have different types and are not comparable. - - - Type '{0}' is not an F# union type. - - - Type '{0}' is not a tuple type. - - - Type '{0}' is not an F# record type. - - - The function did not compute a permutation. - - - Type '{0}' is not the representation of an F# exception declaration. - - - Type '{0}' is not a function type. - - - Arrays with non-zero base cannot be created on this platform. - - - The static initialization of a file or type resulted in static data being accessed recursively before it was fully initialized. - - - The initialization of an object or value resulted in an object or value being accessed recursively before it was fully initialized. - - - Negating the minimum value of a twos complement number is invalid. - - - The IAsyncResult object provided does not match this 'End' operation. - - - The IAsyncResult object provided does not match this 'Cancel' operation. - - - Map values cannot be mutated. - - - Mailbox.Scan timed out. - - - Mailbox.Receive timed out. - - - MailboxProcessor.PostAndReply timed out. - - - MailboxProcessor.PostAndAsyncReply timed out. - - - The MailboxProcessor has already been started. - - - The lists had different lengths. - - - The item, key, or index was not found in the collection. - - - This is not a valid tuple type for the F# reflection library. - - - The input sequence was empty. - - - The input must be positive. - - - The input must be non-negative. - - - The input list was empty. - - - The index was outside the range of elements in the list. - - - Failure during generic comparison: the type '{0}' 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. - - - Failed to read enough bytes from the stream. - - - Enumeration based on System.Int32 exceeded System.Int32.MaxValue. - - - Set contains no elements. - - - Enumeration has not started. Call MoveNext. - - - Enumeration already finished. - - - The end of a range cannot be NaN. - - - Dynamic invocation of op_Multiply involving overloading is not supported. - - - Dynamic invocation of op_Multiply involving coercions is not supported. - - - Dynamic invocation of op_Addition involving overloading is not supported. - - - Dynamic invocation of op_Addition involving coercions is not supported. - - - Dynamic invocation of DivideByInt involving coercions is not supported. - - - Expecting delegate type. - - - Input string was not in a correct format. - - - The input array was empty. - - - The arrays have different lengths. - - - First class uses of address-of operators are not permitted. - - - The match cases were incomplete - - - An active pattern to match values of type - - The input key/value pair. - - A tuple containing the key and value. - - - - let kv = System.Collections.Generic.KeyValuePair(42, "the answer") - match kv with // evaluates to "found it" - | KeyValue (42, v) -> "found it" - | KeyValue (k, v) -> "keep waiting" - - - - - - 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 - input types the operation requires an appropriate static conversion method on the input type. - - The input value. - - The converted char. - - - - char "A" // evaluates to 'A' - char 0x41 // evaluates to 'A' - char 65 // evaluates to 'A' - - - - - - Converts the argument to System.Decimal using a direct conversion for all - primitive numeric types. For strings, the input is converted using UInt64.Parse() - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted decimal. - - - - decimal "42.23" // evaluates to 42.23M - decimal 0xff // evaluates to 255M - decimal -10 // evaluates to -10M - - - - - - Converts the argument to a string using ToString. - - For standard integer and floating point values and any type that implements IFormattable - ToString conversion uses CultureInfo.InvariantCulture. - The input value. - - The converted string. - - - - string 'A' // evaluates to "A" - string 0xff // evaluates to "255" - string -10 // evaluates to "-10" - - - - - - Converts the argument to unsigned native integer using a direct conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted unativeint - - - - unativeint 'A' // evaluates to 65un - unativeint 0xff // evaluates to 255un - unativeint -10 // evaluates to 18446744073709551606un - - - - - - Converts the argument to signed native integer. This is a direct conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted nativeint - - - - nativeint 'A' // evaluates to 65n - nativeint 0xff // evaluates to 255n - nativeint -10 // evaluates to -10n - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted float - - - - float 'A' // evaluates to 65.0 - float 0xff // evaluates to 255.0 - float -10 // evaluates to -10.0 - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted float32 - - - - float32 'A' // evaluates to 65.0f - float32 0xff // evaluates to 255.0f - float32 -10 // evaluates to -10.0f - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted uint64 - - - - uint64 'A' // evaluates to 65UL - uint64 0xff // evaluates to 255UL - uint64 -10 // evaluates to 18446744073709551606UL - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int64 - - - - int64 'A' // evaluates to 65L - int64 0xff // evaluates to 255L - int64 -10 // evaluates to -10L - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted uint32 - - - - uint32 'A' // evaluates to 65u - uint32 0xff // evaluates to 255u - uint32 -10 // evaluates to 4294967286u - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int32 - - - - int32 'A' // evaluates to 65 - int32 0xff // evaluates to 255 - int32 -10 // evaluates to -10 - - - - - - Converts the argument to a particular enum type. - - The input value. - - The converted enum type. - - - - type Color = - | Red = 1 - | Green = 2 - | Blue = 3 - let c: Color = enum 3 // c evaluates to Blue - - - - - - Converts the argument to an 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int - - - - uint 'A' // evaluates to 65u - uint 0xff // evaluates to 255u - uint -10 // evaluates to 4294967286u - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int - - - - int 'A' // evaluates to 65 - int 0xff // evaluates to 255 - int -10 // evaluates to -10 - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted uint16 - - - - uint16 'A' // evaluates to 65us - uint16 0xff // evaluates to 255s - uint16 -10 // evaluates to 65526us - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted int16 - - - - int16 'A' // evaluates to 65s - int16 0xff // evaluates to 255s - int16 -10 // evaluates to -10s - - - - - - 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 an appropriate - static conversion method on the input type. - - The input value. - - The converted sbyte - - - - sbyte 'A' // evaluates to 65y - sbyte 0xff // evaluates to -1y - sbyte -10 // evaluates to -10y - - - - - - Converts the argument to byte. This is a direct conversion for all - primitive numeric types. For strings, the input is converted using Byte.Parse() - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted byte - - - - byte 'A' // evaluates to 65uy - byte 0xff // evaluates to 255uy - byte -10 // evaluates to 246uy - - - - - - Overloaded power operator. If n > 0 then equivalent to x*...*x for n occurrences of x. - - The input base. - The input exponent. - - The base raised to the exponent. - - - - pown 2.0 3 // evaluates to 8.0 - - - - - - Overloaded power operator. - - The input base. - The input exponent. - - The base raised to the exponent. - - - - 2.0 ** 3 // evaluates to 8.0 - - - - - - Overloaded truncate operator. - - The input value. - - The truncated value. - - - - truncate 23.92 // evaluates to 23.0 - truncate 23.92f // evaluates to 23.0f - - - - - - Hyperbolic tangent of the given number - - The input value. - - The hyperbolic tangent of the input. - - - - tanh -1.0 // evaluates to -0.761594156 - tanh 0.0 // evaluates to 0.0 - tanh 1.0 // evaluates to 0.761594156 - - - - - - Tangent of the given number - - The input value. - - The tangent of the input. - - - - tan (-0.5 * System.Math.PI) // evaluates to -1.633123935e+16 - tan (0.0 * System.Math.PI) // evaluates to 0.0 - tan (0.5 * System.Math.PI) // evaluates to 1.633123935e+16 - - - - - - Hyperbolic sine of the given number - - The input value. - - The hyperbolic sine of the input. - - - - sinh -1.0 // evaluates to -1.175201194 - sinh 0.0 // evaluates to 0.0 - sinh 1.0 // evaluates to 1.175201194 - - - - - - Sine of the given number - - The input value. - - The sine of the input. - - - - sin (0.0 * System.Math.PI) // evaluates to 0.0 - sin (0.5 * System.Math.PI) // evaluates to 1.0 - sin (1.0 * System.Math.PI) // evaluates to 1.224646799e-16 - - - - - - Hyperbolic cosine of the given number - - The input value. - - The hyperbolic cosine of the input. - - - - cosh -1.0 // evaluates to 1.543080635 - cosh 0.0 // evaluates to 1.0 - cosh 1.0 // evaluates to 1.543080635 - - - - - - Cosine of the given number - - The input value. - - The cosine of the input. - - - - cos (0.0 * System.Math.PI) // evaluates to 1.0 - cos (0.5 * System.Math.PI) // evaluates to 6.123233996e-17 - cos (1.0 * System.Math.PI) // evaluates to -1.0 - - - - - - Square root of the given number - - The input value. - - The square root of the input. - - - - sqrt 2.0 // Evaluates to 1.414213562 - sqrt 100.0 // Evaluates to 10.0 - - - - - - Logarithm to base 10 of the given number - - The input value. - - The logarithm to base 10 of the input. - - - - log10 1000.0 // Evaluates to 3.0 - log10 100000.0 // Evaluates to 5.0 - log10 0.0001 // Evaluates to -4.0 - log10 -20.0 // Evaluates to nan - - - - - - Natural logarithm of the given number - - The input value. - - The natural logarithm of the input. - - - - let logBase baseNumber value = (log value) / (log baseNumber) - logBase 2.0 32.0 // Evaluates to 5.0 - logBase 10.0 1000.0 // Evaluates to 3.0 - - - - - - Round the given number - - The input value. - - The nearest integer to the input value. - - - - round 3.49 // Evaluates to 3.0 - round -3.49 // Evaluates to -3.0 - round 3.5 // Evaluates to 4.0 - round -3.5 // Evaluates to -4.0 - - - - - - Sign of the given number - - The input value. - - -1, 0, or 1 depending on the sign of the input. - - - - sign -12.0 // Evaluates to -1 - sign 43 // Evaluates to 1 - - - - - - Floor of the given number - - The input value. - - The floor of the input. - - - - floor 12.1 // Evaluates to 12.0 - floor -1.9 // Evaluates to -2.0 - - - - - - Exponential of the given number - - The input value. - - The exponential of the input. - - - - exp 0.0 // Evaluates to 1.0 - exp 1.0 // Evaluates to 2.718281828 - exp -1.0 // Evaluates to 0.3678794412 - exp 2.0 // Evaluates to 7.389056099 - - - - - - Ceiling of the given number - - The input value. - - The ceiling of the input. - - - - ceil 12.1 // Evaluates to 13.0 - ceil -1.9 // Evaluates to -1.0 - - - - - - Inverse tangent of x/y where x and y are specified separately - - The y input value. - The x input value. - - The inverse tangent of the input ratio. - - - - let angleFromPlaneAtXY x y = atan2 y x * 180.0 / System.Math.PI - angleFromPlaneAtXY 0.0 -1.0 // Evaluates to -90.0 - angleFromPlaneAtXY 1.0 1.0 // Evaluates to 45.0 - angleFromPlaneAtXY -1.0 1.0 // Evaluates to 135.0 - - - - - - Inverse tangent of the given number - - The input value. - - The inverse tangent of the input. - - - - let angleFrom opposite adjacent = atan(opposite / adjacent) - angleFrom 5.0 5.0 // Evaluates to 0.7853981634 - - - - - - Inverse sine of the given number - - The input value. - - The inverse sine of the input. - - - - let angleFromOpposite opposite hypotenuse = asin(opposite / hypotenuse) - angleFromOpposite 6.0 10.0 // Evaluates to 0.6435011088 - angleFromOpposite 5.0 3.0 // Evaluates to nan - - - - - - Inverse cosine of the given number - - The input value. - - The inverse cosine of the input. - - - - let angleFromAdjacent adjacent hypotenuse = acos(adjacent / hypotenuse) - angleFromAdjacent 8.0 10.0 // Evaluates to 0.6435011088 - - - - - - Absolute value of the given number. - - The input value. - - The absolute value of the input. - - - - abs -12 // Evaluates to 12 - abs -15.0 // Evaluates to 15.0 - - - - - - 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. - - The limit of nodes. - The input object. - - The computed hash. - - - - - - 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 input object. - - The computed hash. - - - - hash "Bob Jones" // Evaluates to -325251320 - - - - - - Returns the internal size of a type in bytes. For example, sizeof<int> returns 4. - - - - sizeof<bool> // Evaluates to 1 - sizeof<byte> // Evaluates to 1 - sizeof<int> // Evaluates to 4 - sizeof<double> // Evaluates to 8 - sizeof<struct(byte * byte)> // Evaluates to 2 - sizeof<nativeint> // Evaluates to 4 or 8 (32-bit or 64-bit) depending on your platform - - - - - - 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. - - - - typeof<int list;> // Evaluates to Microsoft.FSharp.Collections.FSharpList`1[System.Int32] - typedefof<int list;> // Evaluates to Microsoft.FSharp.Collections.FSharpList`1[T] /// - - - - - - An internal, library-only compiler intrinsic for compile-time - generation of a RuntimeMethodHandle. - - - Returns the name of the given symbol. - - - - let myVariableName = "This value doesn't matter" - nameof(myVariableName) // Evaluates to "myVariableName" - - - - - - Generate a System.Type runtime representation of a static type. - - - - let t = typeof<int> // Gets the System.Type - t.FullName // Evaluates to "System.Int32" - - - - - - 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. - - The resource to be disposed after action is called. - The action that accepts the resource. - - The resulting value. - - - The following code appends 10 lines to test.txt, then closes the StreamWriter when finished. - - open System.IO - - using (File.AppendText "test.txt") (fun writer -> - for i in 1 .. 10 do - writer.WriteLine("Hello World {0}", i)) - - - - - - - Execute the function as a mutual-exclusion region using the input value as a lock. - - The object to be locked. - The action to perform during the lock. - - The resulting value. - - - - open System.Linq - - /// A counter object, supporting unlocked and locked increment - type TestCounter () = - let mutable count = 0 - - /// Increment the counter, unlocked - member this.IncrementWithoutLock() = - count <- count + 1 - - /// Increment the counter, locked - member this.IncrementWithLock() = - lock this (fun () -> count <- count + 1) - - /// Get the count - member this.Count = count - - let counter = TestCounter() - - // Create a parallel sequence to that uses all our CPUs - (seq {1..100000}).AsParallel() - .ForAll(fun _ -> counter.IncrementWithoutLock()) - - // Evaluates to a number between 1-100000, non-deterministically because there is no locking - counter.Count - - let counter2 = TestCounter() - - // Create a parallel sequence to that uses all our CPUs - (seq {1..100000}).AsParallel() - .ForAll(fun _ -> counter2.IncrementWithLock()) - - // Evaluates to 100000 deterministically because the increment to the counter object is locked - counter2.Count - - - - - - The standard overloaded skip range operator, e.g. [n..skip..m] for lists, seq {n..skip..m} for sequences - - The start value of the range. - The step value of the range. - The end value of the range. - - The sequence spanning the range using the specified step size. - - - - [1..2..6] // Evaluates to [1; 3; 5] - [1.1..0.2..1.5] // Evaluates to [1.1; 1.3; 1.5] - ['a'..'e'] // Evaluates to ['a'; 'b'; 'c'; 'd'; 'e'] - - - - - - The standard overloaded range operator, e.g. [n..m] for lists, seq {n..m} for sequences - - The start value of the range. - The end value of the range. - - The sequence spanning the range. - - - - [1..4] // Evaluates to [1; 2; 3; 4] - [1.5..4.4] // Evaluates to [1.5; 2.5; 3.5] - ['a'..'d'] // Evaluates to ['a'; 'b'; 'c'; 'd'] - - [|1..4|] // Evaluates to an array [|1; 2; 3; 4|] - { 1..4 } // Evaluates to a sequence [1; 2; 3; 4]) - - - - - - Reads the value of the property . - - - Reads the value of the property . - - - Reads the value of the property . - - - Equivalent to - - - Equivalent to - - - Equivalent to - - - Equivalent to - - - Exit the current hardware isolated process, if security settings permit, - otherwise raise an exception. Calls . - - The exit code to use. - - Never returns. - - - - [<EntryPoint>] - let main argv = - if argv.Length = 0 then - eprintfn "You must provide arguments" - exit(-1) // Causes program to quit with an error code - printfn "Argument count: %i" argv.Length - 0 - - - - - - Builds a sequence using sequence expression syntax - - The input sequence. - - The result sequence. - - - - seq { for i in 0..10 do yield (i, i*i) } - - - - - - Negate a logical value. Not True equals False and not False equals True - - The value to negate. - - The result of the negation. - - - - not (2 + 2 = 5) // Evaluates to true - - // not is a function that can be compose with other functions - let fileDoesNotExist = System.IO.File.Exists >> not - - - - - - Concatenate two lists. - - The first list. - The second list. - - The concatenation of the lists. - - - - let l1 = ['a'; 'b'; 'c'] - let l2 = ['d'; 'e'; 'f'] - l1 @ l2 // Evalulates to ['a'; 'b'; 'c'; 'd'; 'e'; 'f'] - - - - - - Increment a mutable reference cell containing an integer - - The reference cell. - - - - let count = ref 99 // Creates a reference cell object with a mutable Value property - incr count // Increments our counter - count.Value // Evaluates to 100 - - - - - - Decrement a mutable reference cell containing an integer - - The reference cell. - - - - let count = ref 99 // Creates a reference cell object with a mutable Value property - decr count // Decrements our counter - count.Value // Evaluates to 98 - - - - - - Dereference a mutable reference cell - - The cell to dereference. - - The value contained in the cell. - - - - let count = ref 12 // Creates a reference cell object with a mutable Value property - count.Value // Evaluates to 12 - !count // Also evaluates to 12 (with shorter syntax) - - - - - - Assign to a mutable reference cell - - The cell to mutate. - The value to set inside the cell. - - - - let count = ref 0 // Creates a reference cell object with a mutable Value property - count.Value <- 1 // Updates the value - count := 2 // Also updates the value, but with shorter syntax - count.Value // Evaluates to 2 - - - - - - Create a mutable reference cell - - The value to contain in the cell. - - The created reference cell. - - - - let count = ref 0 // Creates a reference cell object with a mutable Value property - count.Value // Evaluates to 0 - count.Value <- 1 // Updates the value - count.Value // Evaluates to 1 - - - - - - The identity function - - The input value. - - The same value. - - - - id 12 // Evaulates to 12 - id "abc" // Evaulates to "abc" - - - - - - Throw a exception - - The exception message. - - The result value. - - - - type FileReader(fileName: string) = - let mutable isOpen = false - member this.Open() = - if isOpen then invalidOp "File is already open" - // ... Here we may open the file ... - isOpen <- true - - let reader = FileReader("journal.txt") - reader.Open() // Executes fine - reader.Open() // Throws System.InvalidOperationException: File is already open - - - - - - Throw a exception - - The argument name. - - Never returns. - - - - let fullName firstName lastName = - if isNull firstName then nullArg (nameof(firstName)) - if isNull lastName then nullArg (nameof(lastName)) - firstName + " " + lastName - - fullName null "Jones" // Throws System.ArgumentNullException: Value cannot be null. (Parameter 'firstName') - - - - - - Throw a exception with - the given argument name and message. - - The argument name. - The exception message. - - Never returns. - - - - let fullName firstName lastName = - if String.IsNullOrWhiteSpace(firstName) then - invalidArg (nameof(firstName)) "First name can't be null or blank" - if String.IsNullOrWhiteSpace(lastName) then - invalidArg (nameof(lastName)) "Last name can't be null or blank" - firstName + " " + lastName - - fullName null "Jones" - - Throws System.ArgumentException: First name can't be null or blank (Parameter 'firstName') - - - - - Throw a exception. - - The exception message. - - Never returns. - - - - let failingFunction() = - failwith "Oh no" // Throws an exception - true // Never reaches this - - failingFunction() // Throws a System.Exception - - - - - - Determines whether the given value is not null. - - The value to check. - - True when value is not null, false otherwise. - - - Determines whether the given value is null. - - The value to check. - - True when value is null, false otherwise. - - - - isNull null // Evaluates to true - isNull "Not null" // Evaluates to false - - - - - - Try to unbox a strongly typed value. - - The boxed value. - - The unboxed result as an option. - - - - let x: int = 123 - let obj1 = box x // obj1 is a generic object type - tryUnbox<int> obj1 // Evaluates to Some(123) - tryUnbox<double> obj1 // Evaluates to None - - - - - - Boxes a strongly typed value. - - The value to box. - - The boxed object. - - - - let x: int = 123 - let obj1 = box x // obj1 is a generic object type - unbox<int> obj1 // Evaluates to 123 (int) - unbox<double> obj1 // Throws System.InvalidCastException - - - - - - Unbox a strongly typed value. - - The boxed value. - - The unboxed result. - - - - let x: int = 123 - let obj1 = box x // obj1 is a generic object type - unbox<int> obj1 // Evaluates to 123 (int) - unbox<double> obj1 // Throws System.InvalidCastException - - - - - - Ignore the passed value. This is often used to throw away results of a computation. - - The value to ignore. - - - - ignore 55555 // Evaluates to () - - - - - - Minimum based on generic comparison - - The first value. - The second value. - - The minimum value. - - - - min 1 2 // Evaluates to 1 - min [1;2;3] [1;2;4] // Evaluates to [1;2;3] - min "zoo" "alpha" // Evaluates to "alpha" - - - - - - Maximum based on generic comparison - - The first value. - The second value. - - The maximum value. - - - - max 1 2 // Evaluates to 2 - max [1;2;3] [1;2;4] // Evaluates to [1;2;4] - max "zoo" "alpha" // Evaluates to "zoo" - - - - - - Generic comparison. - - The first value. - The second value. - - The result of the comparison. - - - - compare 1 2 // Evaluates to -1 - compare [1;2;3] [1;2;4] // Evaluates to -1 - compare 2 2 // Evaluates to 0 - compare [1;2;3] [1;2;3] // Evaluates to 0 - compare 2 1 // Evaluates to 1 - compare [1;2;4] [1;2;3] // Evaluates to 1 - - - - - - Return the second element of a tuple, snd (a,b) = b. - - The input tuple. - - The second value. - - - - snd ("first", 2) // Evaluates to 2 - - - - - - Return the first element of a tuple, fst (a,b) = a. - - The input tuple. - - The first value. - - - - fst ("first", 2) // Evaluates to "first" - - - - - - Matches objects whose runtime type is precisely - - The input exception. - - A string option. - - - - - - Builds a object. - - The message for the Exception. - - A System.Exception. - - - - let throwException() = - raise(Failure("Oh no!!!")) - true // Never gets here - - throwException() // Throws a generic Exception class - - - - - - Rethrows an exception. This should only be used when handling an exception - The result value. - - - - let readFile (fileName: string) = - try - File.ReadAllText(fileName) - with ex -> - eprintfn "Couldn't read %s" fileName - reraise() - - readFile "/this-file-doest-exist" - // Prints the message to stderr - // Throws a System.IO.FileNotFoundException - - - - - - Rethrows an exception. This should only be used when handling an exception - The result value. - - - Raises an exception - - The exception to raise. - - The result value. - - - - open System.IO - exception FileNotFoundException of string - - let readFile (fileName: string) = - if not (File.Exists(fileName)) then - raise(FileNotFoundException(fileName)) - File.ReadAllText(fileName) - - readFile "/this-file-doest-exist" - - When executed, raises a FileNotFoundException. - - - - - Concatenate two strings. The operator '+' may also be used. - - - Used to specify a default value for an optional argument in the implementation of a function - - A value option representing the argument. - The default value of the argument. - - The argument value. If it is None, the defaultValue is returned. - - - - let arg1 = ValueSome(5) - defaultValueArg arg1 6 // Evaluates to 5 - defaultValueArg ValueNone 6 // Evaluates to 6 - - - - - - Used to specify a default value for an optional argument in the implementation of a function - - An option representing the argument. - The default value of the argument. - - The argument value. If it is None, the defaultValue is returned. - - - - type Vector(x: double, y: double, ?z: double) = - let z = defaultArg z 0.0 - member this.X = x - member this.Y = y - member this.Z = z - - let v1 = Vector(1.0, 2.0) - v1.Z // Evaluates to 0. - let v2 = Vector(1.0, 2.0, 3.0) - v2.Z // Evaluates to 3.0 - - - - - - Apply a function to three values, the values being a triple on the right, the function on the left - - The function. - The first argument. - The second argument. - The third argument. - - The function result. - - - - let sum3 x y z = x + y + z - sum3 <||| (3, 4, 5) // Evaluates to 12 - - - - - - Apply a function to two values, the values being a pair on the right, the function on the left - - The function. - The first argument. - The second argument. - - The function result. - - - - let sum x y = x + y - sum <|| (3, 4) // Evaluates to 7 - - - - - - Apply a function to a value, the value being on the right, the function on the left - - The function. - The argument. - - The function result. - - - - let doubleIt x = x * 2 - doubleIt <| 3 // Evaluates to 6 - - - - - - Apply a function to three values, the values being a triple on the left, the function on the right - - The first argument. - The second argument. - The third argument. - The function. - - The function result. - - - - let sum3 x y z = x + y + z - (3, 4, 5) |||> sum3 // Evaluates to 12 - - - - - - Apply a function to two values, the values being a pair on the left, the function on the right - - The first argument. - The second argument. - The function. - - The function result. - - - - let sum x y = x + y - (3, 4) ||> sum // Evaluates to 7 - - - - - - Apply a function to a value, the value being on the left, the function on the right - - The argument. - The function. - - The function result. - - - - let doubleIt x = x * 2 - 3 |> doubleIt // Evaluates to 6 - - - - - - Compose two functions, the function on the right being applied first - - The second function to apply. - The first function to apply. - - The composition of the input functions. - - - - let addOne x = x + 1 - let doubleIt x = x * 2 - let doubleThenAdd = addOne << doubleIt - doubleThenAdd 3 - - - - - - Compose two functions, the function on the left being applied first - - The first function to apply. - The second function to apply. - - The composition of the input functions. - - - - let addOne x = x + 1 - let doubleIt x = x * 2 - let addThenDouble = addOne >> doubleIt - addThenDouble 3 // Evaluates to 8 - - - - - - Structural inequality - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 <> 5 // Evaluates to false - 5 <> 6 // Evaluates to true - [1; 2] <> [1; 2] // Evaluates to false - - - - - - Structural equality - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 = 5 // Evaluates to true - 5 = 6 // Evaluates to false - [1; 2] = [1; 2] // Evaluates to true - (1, 5) = (1, 6) // Evaluates to false - - - - - - Structural less-than-or-equal comparison - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 <= 1 // Evaluates to false - 5 <= 5 // Evaluates to true - [1; 5] <= [1; 6] // Evaluates to true - - - - - - Structural greater-than-or-equal - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 >= 1 // Evaluates to true - 5 >= 5 // Evaluates to true - [1; 5] >= [1; 6] // Evaluates to false - - - - - - Structural greater-than - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 5 > 1 // Evaluates to true - 5 > 5 // Evaluates to false - (1, "a") > (1, "z") // Evaluates to false - - - - - - Structural less-than comparison - - The first parameter. - The second parameter. - - The result of the comparison. - - - - 1 < 5 // Evaluates to true - 5 < 5 // Evaluates to false - (1, "a") < (1, "z") // Evaluates to true - - - - - - Overloaded prefix-plus operator - - The input value. - - The result of the operation. - - - - - - Overloaded bitwise-NOT operator - - The input value. - - The result of the operation. - - - - let byte1 = 60uy // 00111100 - let byte2 = ~~~b1 // 11000011 - - Evaluates to 195 - - - - - Overloaded byte-shift right operator by a specified number of bits - - The input value. - The amount to shift. - - The result of the operation. - - - - let a = 206 // 00000000000000000000000011010000 - let c1 = a >>> 2 // 00000000000000000000000000110100 - // Evaluates to 51 - let c2 = a >>> 6 // 00000000000000000000000000000011 - Evaluates to 3 - - - - - Overloaded byte-shift left operator by a specified number of bits - - The input value. - The amount to shift. - - The result of the operation. - - - - let a = 13 // 00000000000000000000000000001101 - let c = a <<< 4 // 00000000000000000000000011010000 - - Evaluates to 208 - - - - Overloaded bitwise-XOR operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - let a = 13 // 00000000000000000000000000001101 - let b = 11 // 00000000000000000000000000001011 - let c = a ^^^ b // 00000000000000000000000000000110 - - Evaluates to 6 - - - - Overloaded bitwise-OR operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - let a = 13 // 00000000000000000000000000001101 - let b = 11 // 00000000000000000000000000001011 - let c = a ||| b // 00000000000000000000000000001111 - - Evaluates to 15 - - - - Overloaded bitwise-AND operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - let a = 13 // 00000000000000000000000000001101 - let b = 11 // 00000000000000000000000000001011 - let c = a &&& b // 00000000000000000000000000001001 - - Evaluates to 9 - - - - Overloaded modulo operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 29 % 5 // Evaluates to 4 - - - - - Overloaded division operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 16 / 2 // Evaluates to 8 - - - - - Overloaded multiplication operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 8 * 6 // Evaluates to 48 - - - - - Overloaded subtraction operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 10 - 2 // Evaluates to 8 - - - - - Overloaded addition operator - - The first parameter. - The second parameter. - - The result of the operation. - - - - 2 + 2 // Evaluates to 4 - "Hello " + "Word" // Evaluates to "Hello World" - - - - - - Overloaded unary negation. - - The value to negate. - - The result of the operation. - - - - - - Converts the argument to char. Numeric inputs are converted using a checked - conversion according to the UTF-16 encoding for characters. String inputs must - be exactly one character long. For other input types the operation requires an - appropriate static conversion method on the input type. - - The input value. - - The converted char - - - - - - Converts the argument to unativeint. This is a direct, checked conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted unativeint - - - - - - Converts the argument to . This is a direct, checked conversion for all - primitive numeric types. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted nativeint - - - - - - Converts the argument to uint64. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint64 - - - - - - Converts the argument to int64. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int64 - - - - - - Converts the argument to uint32. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint32 - - - - - - Converts the argument to int32. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int32 - - - - - - Converts the argument to int. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int - - - - - - Converts the argument to uint16. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted uint16 - - - - - - Converts the argument to int16. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted int16 - - - - - - Converts the argument to sbyte. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted sbyte - - - - - - Converts the argument to byte. This is a direct, checked conversion for all - primitive numeric types. For strings, the input is converted using - with InvariantCulture settings. Otherwise the operation requires an appropriate - static conversion method on the input type. - - The input value. - - The converted byte - - - - - - Overloaded multiplication operator (checks for overflow) - - The first value. - The second value. - - The product of the two input values. - - - - - - Overloaded addition operator (checks for overflow) - - The first value. - The second value. - - The sum of the two input values. - - - - - - Overloaded subtraction operator (checks for overflow) - - The first value. - The second value. - - The first value minus the second value. - - - - - - Overloaded unary negation (checks for overflow) - - The input value. - - The negated value. - - - - - - This module contains the basic arithmetic operations with overflow checks. - - - Calls GetHashCode() on the value - - The value. - - The hash code. - - - - - - Minimum of the two values - - The first value. - The second value. - - The minimum value. - - - - - - Maximum of the two values - - The first value. - The second value. - - The maximum value. - - - - - - Compares the two values - - The first value. - The second value. - - The result of the comparison. - - - - - - Compares the two values for inequality - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for equality - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for less-than-or-equal - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for greater-than-or-equal - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for greater-than - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - Compares the two values for less-than - - The first parameter. - The second parameter. - - The result of the comparison. - - - - - - A module of comparison and equality operators that are statically resolved, but which are not fully generic and do not make structural comparison. Opening this - module may make code that relies on structural or generic comparison no longer compile. - - - Perform generic hashing on a value where the type of the value is not - statically required to satisfy the 'equality' constraint. - The computed hash value. - - - - - - Perform generic equality on two values where the type of the values is not - statically required to satisfy the 'equality' constraint. - The result of the comparison. - - - - - - Perform generic comparison on two values where the type of the values is not - statically required to have the 'comparison' constraint. - The result of the comparison. - - - - - - Generate a default 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. - - - - - - Unboxes a strongly typed value. This is the inverse of box, unbox<t>(box<t> a) equals a. - - The boxed value. - - The unboxed result. - - - - - - This module contains basic operations which do not apply runtime and/or static checks - - - 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 '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 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 'unativeint' - - - 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 'uint64' - - - 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 'uint32' - - - 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 'uint16' - - - 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 'sbyte' - - - 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 evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - This is a library intrinsic. Calls to this function may be generated by evaluating quotations. - - - Generate a range of values using the given zero, add, start, step and stop values - - - Generate a range of values using the given zero, add, start, step and stop values - - - Generate a range of char values - - - Generate a range of byte values - - - Generate a range of sbyte values - - - Generate a range of uint16 values - - - Generate a range of int16 values - - - Generate a range of unativeint values - - - Generate a range of nativeint values - - - Generate a range of uint32 values - - - Generate a range of uint64 values - - - Generate a range of int64 values - - - Generate a range of float32 values - - - Generate a range of float values - - - Generate a range of integers - - - Gets a slice from a string - - The source string. - The index of the first character of the slice. - The index of the last character of the slice. - - The substring from the given indices. - - - Sets a slice of an array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 1D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 1D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 1D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 1D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 2D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 3D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - The source array. - - - Sets a 3D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 3D slice of a 4D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Sets a 3D slice of a 4D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - The source array. - - - Gets a 1D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The one dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The fixed index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The two dimensional sub array from the given indices. - - - Gets a 3D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The fixed index of the fourth dimension. - - The three dimensional sub array from the given indices. - - - Gets a 3D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The three dimensional sub array from the given indices. - - - Gets a 3D slice of a 4D array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The three dimensional sub array from the given indices. - - - Gets a 3D slice of a 4D array - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The three dimensional sub array from the given indices. - - - Gets a slice of an array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The start index of the fourth dimension. - The end index of the fourth dimension. - - The four dimensional sub array from the given indices. - - - Sets a 1D slice of a 3D array. - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - The source array. - - The one dimensional sub array from the given indices. - - - Sets a 1D slice of a 3D array. - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The source array. - - The one dimensional sub array from the given indices. - - - Sets a 1D slice of a 3D array. - - The target array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The source array. - - The one dimensional sub array from the given indices. - - - Sets a 2D slice of a 3D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - The source array. - - The two dimensional sub array from the given indices. - - - Sets a 2D slice of a 3D array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The source array. - - The two dimensional sub array from the given indices. - - - Sets a 2D slice of a 3D array - - The target array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The source array. - - The two dimensional sub array from the given indices. - - - Sets a slice of an array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - The source array. - - - Gets a 1D slice of a 3D array. - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The fixed index of the third dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 3D array. - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - - The one dimensional sub array from the given indices. - - - Gets a 1D slice of a 3D array. - - The source array. - The fixed index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - - The one dimensional sub array from the given indices. - - - Gets a 2D slice of a 3D array. - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The fixed index of the third dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 3D array. - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - - The two dimensional sub array from the given indices. - - - Gets a 2D slice of a 3D array. - - The source array. - The fixed index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - - The two dimensional sub array from the given indices. - - - Gets a slice of an array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The start index of the third dimension. - The end index of the third dimension. - - The three dimensional sub array from the given indices. - - - Sets a vector slice of a 2D array. The index of the second dimension is fixed. - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The index of the second dimension. - The source array. - - - Sets a vector slice of a 2D array. The index of the first dimension is fixed. - - The target array. - The index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The source array. - - - Sets a region slice of an array - - The target array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - The source array. - - - Gets a vector slice of a 2D array. The index of the second dimension is fixed. - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The fixed index of the second dimension. - - The sub array from the input indices. - - - Gets a vector slice of a 2D array. The index of the first dimension is fixed. - - The source array. - The index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - - The sub array from the input indices. - - - Gets a region slice of an array - - The source array. - The start index of the first dimension. - The end index of the first dimension. - The start index of the second dimension. - The end index of the second dimension. - - The two dimensional sub array from the input indices. - - - Sets a slice of an array - - The target array. - The start index. - The end index. - The source array. - - - Gets a slice of an array - - The input array. - The start index. - The end index. - - The sub array from the input indices. - - - A module of compiler intrinsic functions for efficient implementations of F# integer ranges - and dynamic invocations of other F# operators - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. - The offset from the end. - - The corresponding index from the start. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. - The offset from the end. - - The corresponding index from the start. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. This refers to the dimension in the 2d array. - The offset from the end. - - The corresponding index from the start. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. This refers to the dimension in the 3d array. - The offset from the end. - - The corresponding index from the start. - - - Get the index for the element offset elements away from the end of the collection. - - The rank of the index. This refers to the dimension in the 4d array. - The offset from the end. - - The corresponding index from the start. - - - Contains extension methods to allow the use of F# indexer notation with arrays. - This module is automatically opened in all F# code. - - - Basic F# Operators. This module is automatically opened in all F# code. - - Basic Operators - - - Invoke an F# first class function value that accepts five curried arguments - without intervening execution - - The first arg. - The second arg. - The third arg. - The fourth arg. - The fifth arg. - - The function result. - - - Adapt an F# first class function value to be an optimized function value that can - accept five curried arguments without intervening execution. - - The input function. - - The optimized function. - - - Construct an optimized function value that can accept five curried - arguments without intervening execution. - The optimized function. - - - The CLI type used to represent F# function values that accept five curried arguments - without intervening execution. This type should not typically used directly from - either F# code or from other CLI languages. - - - Invoke an F# first class function value that accepts four curried arguments - without intervening execution - - The first arg. - The second arg. - The third arg. - The fourth arg. - - The function result. - - - Adapt an F# first class function value to be an optimized function value that can - accept four curried arguments without intervening execution. - - The input function. - - The optimized function. - - - Construct an optimized function value that can accept four curried - arguments without intervening execution. - The optimized function. - - - The CLI type used to represent F# function values that accept four curried arguments - without intervening execution. This type should not typically used directly from - either F# code or from other CLI languages. - - - Invoke an F# first class function value that accepts three curried arguments - without intervening execution - - The first arg. - The second arg. - The third arg. - - The function result. - - - Adapt an F# first class function value to be an optimized function value that can - accept three curried arguments without intervening execution. - - The input function. - - The adapted function. - - - Construct an optimized function value that can accept three curried - arguments without intervening execution. - The optimized function. - - - The CLI 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 CLI languages. - - - Invoke the optimized function value with two curried arguments - - The first arg. - The second arg. - - The function result. - - - Adapt an F# first class function value to be an optimized function value that can - accept two curried arguments without intervening execution. - - The input function. - - The adapted function. - - - Construct an optimized function value that can accept two curried - arguments without intervening execution. - The optimized function. - - - The CLI 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 CLI languages. - - - An implementation module used to hold some private implementations of function - value invocation. - Language Primitives - - - Divides a value by an integer. - - The input value. - The input int. - - The division result. - - - Resolves to the value 'one' 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' - - - A compiler intrinsic that implements dynamic invocations for the DivideByInt primitive. - - - A compiler intrinsic that implements dynamic invocations related to the '=' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '=' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '>=' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '<=' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '>' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '<' operator. - - - A compiler intrinsic that implements dynamic invocations related to checked conversion operators. - - - A compiler intrinsic that implements dynamic invocations related to conversion operators. - - - A compiler intrinsic that implements dynamic invocations related to the '~~~' operator. - - - A compiler intrinsic that implements dynamic invocations related to the '^^^' operator. - - - A compiler intrinsic that implements dynamic invocations to the '|||' operator. - - - A compiler intrinsic that implements dynamic invocations to the '&&&' operator. - - - A compiler intrinsic that implements dynamic invocations to the '>>>' operator. - - - A compiler intrinsic that implements dynamic invocations to the '<<<' operator. - - - A compiler intrinsic that implements dynamic invocations to the checked unary '-' operator. - - - A compiler intrinsic that implements dynamic invocations to the checked '-' operator. - - - A compiler intrinsic that implements dynamic invocations to the '%' operator. - - - A compiler intrinsic that implements dynamic invocations to the unary '-' operator. - - - A compiler intrinsic that implements dynamic invocations to the '/' operator. - - - 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 '*' operator. - - - A compiler intrinsic that implements dynamic invocations to the checked '+' operator. - - - A compiler intrinsic that implements dynamic invocations to the '+' operator. - - - Resolves to the value 'one' 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'. - - - Parse an uint64 according to the rules used by the overloaded 'uint64' conversion operator when applied to strings - - The input string. - - The parsed value. - - - Parse an int64 according to the rules used by the overloaded 'int64' conversion operator when applied to strings - - The input string. - - The parsed value. - - - Parse an uint32 according to the rules used by the overloaded 'uint32' conversion operator when applied to strings - - The input string. - - The parsed value. - - - Parse an int32 according to the rules used by the overloaded 'int32' conversion operator when applied to strings - - The input string. - - The parsed value. - - - Creates a unativeint value with units-of-measure - - The input unativeint. - - The unativeint with units-of-measure. - - - Creates a byte value with units-of-measure - - The input byte. - - The byte with units-of-measure. - - - Creates a uint16 value with units-of-measure - - The input uint16. - - The uint16 with units-of-measure. - - - Creates a uint64 value with units-of-measure - - The input uint64. - - The uint64 with units-of-measure. - - - Creates a uint value with units-of-measure - - The input uint. - - The uint with units-of-measure. - - - Creates a nativeint value with units-of-measure - - The input nativeint. - - The nativeint with units-of-measure. - - - Creates an sbyte value with units-of-measure - - The input sbyte. - - The sbyte with units-of-measure. - - - Creates an int16 value with units-of-measure - - The input int16. - - The int16 with units-of-measure. - - - Creates an int64 value with units-of-measure - - The input int64. - - The int64 with units of measure. - - - Creates an int32 value with units-of-measure - - The input int. - - The int with units of measure. - - - Creates a decimal value with units-of-measure - - The input decimal. - - The decimal with units of measure. - - - Creates a float32 value with units-of-measure - - The input float. - - The float with units-of-measure. - - - Creates a float value with units-of-measure - - The input float. - - The float with units-of-measure. - - - Get the underlying value for an enum value - - The input enum. - - The enumeration as a value. - - - Build an enum value from an underlying value - - The input value. - - The value as an enumeration. - - - Recursively hash a part of a value according to its structure. - - The comparison function. - The input object. - - The hashed value. - - - Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# - records, lists and union types. - - The limit on the number of nodes. - The input object. - - The hashed value. - - - 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. - - The input object. - - The hashed value. - - - 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. - - The input limit on the number of nodes. - - System.Collections.Generic.IEqualityComparer<'T> - - - Make an F# hash/equality object for the given type - - - Make an F# comparer object for the given type, where it can be null if System.Collections.Generic.Comparer<'T>.Default - - - Make an F# comparer object for the given type - - - 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. This equality comparer has equivalence - relation semantics ([nan] = [nan]). - - - 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. - - - The physical hash. Hashes on the object identity. - - The input object. - - The hashed value. - - - Reference/physical equality. - True if the inputs are reference-equal, false otherwise. - - The first value. - The second value. - - The result of the comparison. - - - Take the maximum of two values structurally according to the order given by GenericComparison - - The first value. - The second value. - - The maximum value. - - - Take the minimum of two values structurally according to the order given by GenericComparison - - The first value. - The second value. - - The minimum value. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values. May be called as a recursive case from an implementation of System.IComparable to - ensure consistent NaN comparison semantics. - - The function to compare the values. - The first value. - The second value. - - The result of the comparison. - - - Compare two values - - The first value. - The second value. - - The result of the comparison. - - - Compare two values for equality - - - The first value. - The second value. - - The result of the comparison. - - - Compare two values for equality using equivalence relation semantics ([nan] = [nan]) - - The first value. - The second value. - - The result of the comparison. - - - Compare two values for equality using partial equivalence relation semantics ([nan] <> [nan]) - - The first value. - The second value. - - The result of the comparison. - - - 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. - - - 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 - - - - The standard overloaded associative (4-indexed) mutation operator - - - - The standard overloaded associative (3-indexed) mutation operator - - - The standard overloaded associative (2-indexed) mutation operator - - - The standard overloaded associative (indexed) mutation operator - - - The standard overloaded associative (4-indexed) lookup operator - - - The standard overloaded associative (3-indexed) lookup operator - - - The standard overloaded associative (2-indexed) lookup operator - - - The standard overloaded associative (indexed) lookup operator - - - A compiler intrinsic for checking initialization soundness of recursive bindings - - - A compiler intrinsic for checking initialization soundness of recursive static bindings - - - A compiler intrinsic for checking initialization soundness of recursive bindings - - - A compiler intrinsic for the efficient compilation of sequence expressions - - - This function implements parsing of decimal constants - - - This function implements calls to default constructors - accessed by 'new' constraints. - - - Primitive used by pattern match compilation - - - 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. - - The input object. - - The unmanaged pointer. - - - Address-of. Uses of this value may result in the generation of unverifiable code. - - The input object. - - The managed pointer. - - - Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand - - The first value. - The second value. - - The result of the operation. - - - Binary 'or'. 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 - - The first value. - The second value. - - The result of the operation. - - - Binary 'and'. 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 - - - For compiler use only - - - Language primitives associated with the F# language - - Language Primitives - - - - Represents a byref that can be both read and written - - - - - Represents a byref that can be read - - - - - Represents a byref that can be written - - - - Represents the types of byrefs in F# 4.5+ - ByRef and Pointer Types - - - Convert an option to a potentially null value. - - The input value. - - The result value, which is null if the input was ValueNone. - - - - (ValueNone: string ValueOption) |> ValueOption.toObj // evaluates to null - ValueSome "not a null string" |> ValueOption.toObj // evaluates to "not a null string" - - - - - Convert a potentially null value to a value option. - - The input value. - - The result value option. - - - - (null: string) |> ValueOption.ofObj // evaluates to ValueNone - "not a null string" |> ValueOption.ofObj // evaluates to (ValueSome "not a null string") - - - - - Convert a Nullable value to a value option. - - The input nullable value. - - The result value option. - - - - System.Nullable<int>() |> ValueOption.ofNullable // evaluates to ValueNone - System.Nullable(42) |> ValueOption.ofNullable // evaluates to ValueSome 42 - - - - - Convert the value option to a Nullable value. - - The input value option. - - The result value. - - - - (ValueNone: int ValueOption) |> ValueOption.toNullable // evaluates to new System.Nullable<int>() - ValueSome 42 |> ValueOption.toNullable // evaluates to new System.Nullable(42) - - - - - Convert the value option to a list of length 0 or 1. - - The input value option. - - The result list. - - - - (ValueNone: int ValueOption) |> ValueOption.toList // evaluates to [] - ValueSome 42 |> ValueOption.toList // evaluates to [42] - - - - - Convert the value option to an array of length 0 or 1. - - The input value option. - - The result array. - - - - (ValueNone: int ValueOption) |> ValueOption.toArray // evaluates to [||] - ValueSome 42 |> ValueOption.toArray // evaluates to [|42|] - - - - - filter f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> if f x then ValueSome x else ValueNone. - - A function that evaluates whether the value contained in the value option should remain, or be filtered out. - The input value option. - - The input if the predicate evaluates to true; otherwise, ValueNone. - - - - ValueNone |> ValueOption.filter (fun x -> x >= 5) // evaluates to ValueNone - ValueSome 42 |> ValueOption.filter (fun x -> x >= 5) // evaluates to ValueSome 42 - ValueSome 4 |> ValueOption.filter (fun x -> x >= 5) // evaluates to ValueNone - - - - - flatten inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> x - - The input value option. - - The input value if the value is Some; otherwise, ValueNone. - flatten is equivalent to bind id. - - - - (ValueNone: int ValueOption ValueOption) |> ValueOption.flatten // evaluates to ValueNone - (ValueSome ((ValueNone: int ValueOption))) |> ValueOption.flatten // evaluates to ValueNone - (ValueSome (ValueSome 42)) |> ValueOption.flatten // evaluates to ValueSome 42 - - - - - bind f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> f x - - A function that takes the value of type T from a value option and transforms it into - a value option containing a value of type U. - The input value option. - - An option of the output type of the binder. - - - - let tryParse input = - match System.Int32.TryParse (input: string) with - | true, v -> ValueSome v - | false, _ -> ValueNone - ValueNone |> ValueOption.bind tryParse // evaluates to ValueNone - ValueSome "42" |> ValueOption.bind tryParse // evaluates to ValueSome 42 - ValueSome "Forty-two" |> ValueOption.bind tryParse // evaluates to ValueNone - - - - - map f voption1 voption2 voption3 evaluates to match voption1, voption2, voption3 with ValueSome x, ValueSome y, ValueSome z -> ValueSome (f x y z) | _ -> ValueNone. - - A function to apply to the value option values. - The first value option. - The second value option. - The third value option. - - A value option of the input values after applying the mapping function, or ValueNone if any input is ValueNone. - - - - (ValueNone, ValueNone, ValueNone) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueNone - (ValueSome 100, ValueNone, ValueNone) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueNone - (ValueNone, ValueSome 100, ValueNone) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueNone - (ValueNone, ValueNone, ValueSome 100) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueNone - (ValueSome 5, ValueSome 100, ValueSome 10) |||> ValueOption.map3 (fun x y z -> x + y + z) // evaluates to ValueSome 115 - - - - - map f voption1 voption2 evaluates to match voption1, voption2 with ValueSome x, ValueSome y -> ValueSome (f x y) | _ -> ValueNone. - - A function to apply to the voption values. - The first value option. - The second value option. - - A value option of the input values after applying the mapping function, or ValueNone if either input is ValueNone. - - - - (ValueNone, ValueNone) ||> ValueOption.map2 (fun x y -> x + y) // evaluates to ValueNone - (ValueSome 5, ValueNone) ||> ValueOption.map2 (fun x y -> x + y) // evaluates to ValueNone - (ValueNone, ValueSome 10) ||> ValueOption.map2 (fun x y -> x + y) // evaluates to ValueNone - (ValueSome 5, ValueSome 10) ||> ValueOption.map2 (fun x y -> x + y) // evaluates to ValueSome 15 - - - - - map f inp evaluates to match inp with ValueNone -> ValueNone | ValueSome x -> ValueSome (f x). - - A function to apply to the voption value. - The input value option. - - A value option of the input value after applying the mapping function, or ValueNone if the input is ValueNone. - - - - ValueNone |> ValueOption.map (fun x -> x * 2) // evaluates to ValueNone - ValueSome 42 |> ValueOption.map (fun x -> x * 2) // evaluates to ValueSome 84 - - - - - iter f inp executes match inp with ValueNone -> () | ValueSome x -> f x. - - A function to apply to the voption value. - The input value option. - - - - ValueNone |> ValueOption.iter (printfn "%s") // does nothing - ValueSome "Hello world" |> ValueOption.iter (printfn "%s") // prints "Hello world" - - - - - Evaluates to true if is ValueSome and its value is equal to . - - The value to test for equality. - The input value option. - - True if the option is ValueSome and contains a value equal to , otherwise false. - - - - (99, ValueNone) ||> ValueOption.contains // evaluates to false - (99, ValueSome 99) ||> ValueOption.contains // evaluates to true - (99, ValueSome 100) ||> ValueOption.contains // evaluates to false - - - - - forall p inp evaluates to match inp with ValueNone -> true | ValueSome x -> p x. - - A function that evaluates to a boolean when given a value from the value option type. - The input value option. - - True if the option is None, otherwise it returns the result of applying the predicate - to the option value. - - - - ValueNone |> ValueOption.forall (fun x -> x >= 5) // evaluates to true - ValueSome 42 |> ValueOption.forall (fun x -> x >= 5) // evaluates to true - ValueSome 4 |> ValueOption.forall (fun x -> x >= 5) // evaluates to false - - - - - exists p inp evaluates to match inp with ValueNone -> false | ValueSome x -> p x. - - A function that evaluates to a boolean when given a value from the option type. - The input value option. - - False if the option is ValueNone, otherwise it returns the result of applying the predicate - to the option value. - - - - ValueNone |> ValueOption.exists (fun x -> x >= 5) // evaluates to false - ValueSome 42 |> ValueOption.exists (fun x -> x >= 5) // evaluates to true - ValueSome 4 |> ValueOption.exists (fun x -> x >= 5) // evaluates to false - - - - - fold f inp s evaluates to match inp with ValueNone -> s | ValueSome x -> f x s. - - A function to update the state data when given a value from a value option. - The input value option. - The initial state. - - The original state if the option is ValueNone, otherwise it returns the updated state with the folder - and the voption value. - - - - (ValueNone, 0) ||> ValueOption.foldBack (fun x accum -> accum + x * 2) // evaluates to 0 - (ValueSome 1, 0) ||> ValueOption.foldBack (fun x accum -> accum + x * 2) // evaluates to 2 - (ValueSome 1, 10) ||> ValueOption.foldBack (fun x accum -> accum + x * 2) // evaluates to 12 - - - - - fold f s inp evaluates to match inp with ValueNone -> s | ValueSome x -> f s x. - - A function to update the state data when given a value from a value option. - The initial state. - The input value option. - - The original state if the option is ValueNone, otherwise it returns the updated state with the folder - and the voption value. - - - - (0, ValueNone) ||> ValueOption.fold (fun accum x -> accum + x * 2) // evaluates to 0 - (0, ValueSome 1) ||> ValueOption.fold (fun accum x -> accum + x * 2) // evaluates to 2 - (10, ValueSome 1) ||> ValueOption.fold (fun accum x -> accum + x * 2) // evaluates to 12 - - - - - count inp evaluates to match inp with ValueNone -> 0 | ValueSome _ -> 1. - - The input value option. - - A zero if the option is ValueNone, a one otherwise. - - - - ValueNone |> ValueOption.count // evaluates to 0 - ValueSome 99 |> ValueOption.count // evaluates to 1 - - - - - Gets the value associated with the option. - - The input value option. - - The value within the option. - Thrown when the option is ValueNone. - - - - ValueSome 42 |> ValueOption.get // evaluates to 42 - (ValueNone: int ValueOption) |> ValueOption.get // throws exception! - - - - - Returns if it is Some, otherwise evaluates and returns the result. - - A thunk that provides an alternate value option when evaluated. - The input value option. - - The voption if the voption is ValueSome, else the result of evaluating . - is not evaluated unless is ValueNone. - - - - (ValueNone: int ValueOption) |> ValueOption.orElseWith (fun () -> ValueNone) // evaluates to ValueNone - ValueNone |> ValueOption.orElseWith (fun () -> (ValueSome 99)) // evaluates to ValueSome 99 - ValueSome 42 |> ValueOption.orElseWith (fun () -> ValueNone) // evaluates to ValueSome 42 - ValueSome 42 |> ValueOption.orElseWith (fun () -> (ValueSome 99)) // evaluates to ValueSome 42 - - - - - Returns if it is Some, otherwise returns . - - The value to use if is None. - The input option. - - The option if the option is Some, else the alternate option. - - - - ((ValueNone: int ValueOption), ValueNone) ||> ValueOption.orElse // evaluates to ValueNone - (ValueSome 99, ValueNone) ||> ValueOption.orElse // evaluates to ValueSome 99 - (ValueNone, ValueSome 42) ||> ValueOption.orElse // evaluates to ValueSome 42 - (ValueSome 99, ValueSome 42) ||> ValueOption.orElse // evaluates to ValueSome 42 - - - - - Gets the value of the voption if the voption is ValueSome, otherwise evaluates and returns the result. - - A thunk that provides a default value when evaluated. - The input voption. - - The voption if the voption is ValueSome, else the result of evaluating . - is not evaluated unless is ValueNone. - - - - ValueNone |> ValueOption.defaultWith (fun () -> 99) // evaluates to 99 - ValueSome 42 |> ValueOption.defaultWith (fun () -> 99) // evaluates to 42 - - - - - Gets the value of the value option if the option is ValueSome, otherwise returns the specified default value. - - The specified default value. - The input voption. - - The voption if the voption is ValueSome, else the default value. - Identical to the built-in operator, except with the arguments swapped. - - - - (99, ValueNone) ||> ValueOption.defaultValue // evaluates to 99 - (99, ValueSome 42) ||> ValueOption.defaultValue // evaluates to 42 - - - - - Returns true if the value option is ValueNone. - - The input value option. - - True if the voption is ValueNone. - - - - ValueNone |> ValueOption.isNone // evaluates to true - ValueSome 42 |> ValueOption.isNone // evaluates to false - - - - - Returns true if the value option is not ValueNone. - - The input value option. - - True if the value option is not ValueNone. - - - - ValueNone |> ValueOption.isSome // evaluates to false - ValueSome 42 |> ValueOption.isSome // evaluates to true - - - - - Contains operations for working with value options. - - Options - - - Convert an option to a potentially null value. - - The input value. - - The result value, which is null if the input was None. - - - - (None: string option) |> Option.toObj // evaluates to null - Some "not a null string" |> Option.toObj // evaluates to "not a null string" - - - - - Convert a potentially null value to an option. - - The input value. - - The result option. - - - - (null: string) |> Option.ofObj // evaluates to None - "not a null string" |> Option.ofObj // evaluates to (Some "not a null string") - - - - - Convert a Nullable value to an option. - - The input nullable value. - - The result option. - - - - System.Nullable<int>() |> Option.ofNullable // evaluates to None - System.Nullable(42) |> Option.ofNullable // evaluates to Some 42 - - - - - Convert the option to a Nullable value. - - The input option. - - The result value. - - - - (None: int option) |> Option.toNullable // evaluates to new System.Nullable<int>() - Some 42 |> Option.toNullable // evaluates to new System.Nullable(42) - - - - - Convert the option to a list of length 0 or 1. - - The input option. - - The result list. - - - - (None: int option) |> Option.toList // evaluates to [] - Some 42 |> Option.toList // evaluates to [42] - - - - - Convert the option to an array of length 0 or 1. - - The input option. - - The result array. - - - - (None: int option) |> Option.toArray // evaluates to [||] - Some 42 |> Option.toArray // evaluates to [|42|] - - - - - filter f inp evaluates to match inp with None -> None | Some x -> if f x then Some x else None. - - A function that evaluates whether the value contained in the option should remain, or be filtered out. - The input option. - - The input if the predicate evaluates to true; otherwise, None. - - - - None |> Option.filter (fun x -> x >= 5) // evaluates to None - Some 42 |> Option.filter (fun x -> x >= 5) // evaluates to Some 42 - Some 4 |> Option.filter (fun x -> x >= 5) // evaluates to None - - - - - flatten inp evaluates to match inp with None -> None | Some x -> x - - The input option. - - The input value if the value is Some; otherwise, None. - - flatten is equivalent to bind id. - - - - (None: int option option) |> Option.flatten // evaluates to None - (Some ((None: int option))) |> Option.flatten // evaluates to None - (Some (Some 42)) |> Option.flatten // evaluates to Some 42 - - - - - bind f inp evaluates to match inp with None -> None | Some x -> f x - - A function that takes the value of type T from an option and transforms it into - an option containing a value of type U. - The input option. - - An option of the output type of the binder. - - - - let tryParse (input: string) = - match System.Int32.TryParse input with - | true, v -> Some v - | false, _ -> None - None |> Option.bind tryParse // evaluates to None - Some "42" |> Option.bind tryParse // evaluates to Some 42 - Some "Forty-two" |> Option.bind tryParse // evaluates to None - - - - - map f option1 option2 option3 evaluates to match option1, option2, option3 with Some x, Some y, Some z -> Some (f x y z) | _ -> None. - - A function to apply to the option values. - The first option. - The second option. - The third option. - - An option of the input values after applying the mapping function, or None if any input is None. - - - - (None, None, None) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to None - (Some 100, None, None) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to None - (None, Some 100, None) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to None - (None, None, Some 100) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to None - (Some 5, Some 100, Some 10) |||> Option.map3 (fun x y z -> x + y + z) // evaluates to Some 115 - - - - - map f option1 option2 evaluates to match option1, option2 with Some x, Some y -> Some (f x y) | _ -> None. - - A function to apply to the option values. - The first option. - The second option. - - An option of the input values after applying the mapping function, or None if either input is None. - - - - (None, None) ||> Option.map2 (fun x y -> x + y) // evaluates to None - (Some 5, None) ||> Option.map2 (fun x y -> x + y) // evaluates to None - (None, Some 10) ||> Option.map2 (fun x y -> x + y) // evaluates to None - (Some 5, Some 10) ||> Option.map2 (fun x y -> x + y) // evaluates to Some 15 - - - - - map f inp evaluates to match inp with None -> None | Some x -> Some (f x). - - A function to apply to the option value. - The input option. - - An option of the input value after applying the mapping function, or None if the input is None. - - - - None |> Option.map (fun x -> x * 2) // evaluates to None - Some 42 |> Option.map (fun x -> x * 2) // evaluates to Some 84 - - - - - iter f inp executes match inp with None -> () | Some x -> f x. - - A function to apply to the option value. - The input option. - - - - None |> Option.iter (printfn "%s") // does nothing - Some "Hello world" |> Option.iter (printfn "%s") // prints "Hello world" - - - - - Evaluates to true if is Some and its value is equal to . - - The value to test for equality. - The input option. - - True if the option is Some and contains a value equal to , otherwise false. - - - - (99, None) ||> Option.contains // evaluates to false - (99, Some 99) ||> Option.contains // evaluates to true - (99, Some 100) ||> Option.contains // evaluates to false - - - - - forall p inp evaluates to match inp with None -> true | Some x -> p x. - - A function that evaluates to a boolean when given a value from the option type. - The input option. - - True if the option is None, otherwise it returns the result of applying the predicate - to the option value. - - - - None |> Option.forall (fun x -> x >= 5) // evaluates to true - Some 42 |> Option.forall (fun x -> x >= 5) // evaluates to true - Some 4 |> Option.forall (fun x -> x >= 5) // evaluates to false - - - - - exists p inp evaluates to match inp with None -> false | Some x -> p x. - - A function that evaluates to a boolean when given a value from the option type. - The input option. - - False if the option is None, otherwise it returns the result of applying the predicate - to the option value. - - - - None |> Option.exists (fun x -> x >= 5) // evaluates to false - Some 42 |> Option.exists (fun x -> x >= 5) // evaluates to true - Some 4 |> Option.exists (fun x -> x >= 5) // evaluates to false - - - - - fold f inp s evaluates to match inp with None -> s | Some x -> f x s. - - A function to update the state data when given a value from an option. - The input option. - The initial state. - - The original state if the option is None, otherwise it returns the updated state with the folder - and the option value. - - - - (None, 0) ||> Option.foldBack (fun x accum -> accum + x * 2) // evaluates to 0 - (Some 1, 0) ||> Option.foldBack (fun x accum -> accum + x * 2) // evaluates to 2 - (Some 1, 10) ||> Option.foldBack (fun x accum -> accum + x * 2) // evaluates to 12 - - - - - fold f s inp evaluates to match inp with None -> s | Some x -> f s x. - - A function to update the state data when given a value from an option. - The initial state. - The input option. - - The original state if the option is None, otherwise it returns the updated state with the folder - and the option value. - - - - (0, None) ||> Option.fold (fun accum x -> accum + x * 2) // evaluates to 0 - (0, Some 1) ||> Option.fold (fun accum x -> accum + x * 2) // evaluates to 2 - (10, Some 1) ||> Option.fold (fun accum x -> accum + x * 2) // evaluates to 12 - - - - - count inp evaluates to match inp with None -> 0 | Some _ -> 1. - - The input option. - - A zero if the option is None, a one otherwise. - - - - None |> Option.count // evaluates to 0 - Some 99 |> Option.count // evaluates to 1 - - - - - Gets the value associated with the option. - - The input option. - - The value within the option. - - Thrown when the option is None. - - - - Some 42 |> Option.get // evaluates to 42 - (None: int option) |> Option.get // throws exception! - - - - - Returns if it is Some, otherwise evaluates and returns the result. - - A thunk that provides an alternate option when evaluated. - The input option. - - The option if the option is Some, else the result of evaluating . - is not evaluated unless is None. - - - - (None: int Option) |> Option.orElseWith (fun () -> None) // evaluates to None - None |> Option.orElseWith (fun () -> (Some 99)) // evaluates to Some 99 - Some 42 |> Option.orElseWith (fun () -> None) // evaluates to Some 42 - Some 42 |> Option.orElseWith (fun () -> (Some 99)) // evaluates to Some 42 - - - - - Returns if it is Some, otherwise returns . - - The value to use if is None. - The input option. - - The option if the option is Some, else the alternate option. - - - - ((None: int Option), None) ||> Option.orElse // evaluates to None - (Some 99, None) ||> Option.orElse // evaluates to Some 99 - (None, Some 42) ||> Option.orElse // evaluates to Some 42 - (Some 99, Some 42) ||> Option.orElse // evaluates to Some 42 - - - - - Gets the value of the option if the option is Some, otherwise evaluates and returns the result. - - A thunk that provides a default value when evaluated. - The input option. - - The option if the option is Some, else the result of evaluating . - is not evaluated unless is None. - - - - None |> Option.defaultWith (fun () -> 99) // evaluates to 99 - Some 42 |> Option.defaultWith (fun () -> 99) // evaluates to 42 - - - - - Gets the value of the option if the option is Some, otherwise returns the specified default value. - - The specified default value. - The input option. - - The option if the option is Some, else the default value. - - Identical to the built-in operator, except with the arguments swapped. - - - - (99, None) ||> Option.defaultValue // evaluates to 99 - (99, Some 42) ||> Option.defaultValue // evaluates to 42 - - - - - Returns true if the option is None. - - The input option. - - True if the option is None. - - - - None |> Option.isNone // evaluates to true - Some 42 |> Option.isNone // evaluates to false - - - - - Returns true if the option is not None. - The input option. - - True if the option is not None. - - - - None |> Option.isSome // evaluates to false - Some 42 |> Option.isSome // evaluates to true - - - - - Contains operations for working with options. - - Options - - - Convert the result to an Option value. - - The input result. - - The result value. - - - - Error 42 |> Result.toOption // evaluates to ValueNone - Ok 42 |> Result.toOption // evaluates to ValueSome 42 - - - - - Convert the result to an Option value. - - The input result. - - The option value. - - - - Error 42 |> Result.toOption // evaluates to None - Ok 42 |> Result.toOption // evaluates to Some 42 - - - - - Convert the result to a list of length 0 or 1. - - The input result. - - The result list. - - - - Error 42 |> Result.toList // evaluates to [] - Ok 42 |> Result.toList // evaluates to [ 42 ] - - - - - Convert the result to an array of length 0 or 1. - - The input result. - - The result array. - - - - Error 42 |> Result.toArray // evaluates to [||] - Ok 42 |> Result.toArray // evaluates to [| 42 |] - - - - - iter f inp executes match inp with Error _ -> () | Ok x -> f x. - - A function to apply to the result value. - The input result. - - - - Error "Hello world" |> Result.iter (printfn "%s") // does nothing - Ok "Hello world" |> Result.iter (printfn "%s") // prints "Hello world" - - - - - Evaluates to true if is Ok and its value is equal to . - - The value to test for equality. - The input result. - - True if the result is Ok and contains a value equal to , otherwise false. - - - - (99, Error 99) ||> Result.contains // evaluates to false - (99, Ok 99) ||> Result.contains // evaluates to true - (99, Ok 100) ||> Result.contains // evaluates to false - - - - - forall p inp evaluates to match inp with Error _ -> true | Ok x -> p x. - - A function that evaluates to a boolean when given a value from the result type. - The input result. - - True if the result is Error, otherwise it returns the result of applying the predicate - to the result value. - - - - Error 1 |> Result.forall (fun x -> x >= 5) // evaluates to true - Ok 42 |> Result.forall (fun x -> x >= 5) // evaluates to true - Ok 4 |> Result.forall (fun x -> x >= 5) // evaluates to false - - - - - exists p inp evaluates to match inp with Error _ -> false | Ok x -> p x. - - A function that evaluates to a boolean when given a value from the result type. - The input result. - - False if the result is Error, otherwise it returns the result of applying the predicate - to the result value. - - - - Error 6 |> Result.exists (fun x -> x >= 5) // evaluates to false - Ok 42 |> Result.exists (fun x -> x >= 5) // evaluates to true - Ok 4 |> Result.exists (fun x -> x >= 5) // evaluates to false - - - - - fold f inp s evaluates to match inp with Error _ -> s | Ok x -> f x s. - - A function to update the state data when given a value from an result. - The input result. - The initial state. - - The original state if the result is Error, otherwise it returns the updated state with the folder - and the result value. - - - - (Error 2, 0) ||> Result.foldBack (fun x accum -> accum + x * 2) // evaluates to 0 - (Ok 1, 0) ||> Result.foldBack (fun x accum -> accum + x * 2) // evaluates to 2 - (Ok 1, 10) ||> Result.foldBack (fun x accum -> accum + x * 2) // evaluates to 12 - - - - - fold f s inp evaluates to match inp with Error _ -> s | Ok x -> f s x. - - A function to update the state data when given a value from an result. - The initial state. - The input result. - - The original state if the result is Error, otherwise it returns the updated state with the folder - and the result value. - - - - (0, Error 2) ||> Result.fold (fun accum x -> accum + x * 2) // evaluates to 0 - (0, Ok 1) ||> Result.fold (fun accum x -> accum + x * 2) // evaluates to 2 - (10, Ok 1) ||> Result.fold (fun accum x -> accum + x * 2) // evaluates to 12 - - - - - count inp evaluates to match inp with Error _ -> 0 | Ok _ -> 1. - - The input result. - - A zero if the result is Error, a one otherwise. - - - - Error 99 |> Result.count // evaluates to 0 - Ok 99 |> Result.count // evaluates to 1 - - - - - Gets the value of the result if the result is Ok, otherwise evaluates and returns the result. - - A thunk that provides a default value when evaluated. - The input result. - - The result if the result is Ok, else the result of evaluating . - is not evaluated unless is Error. - - - - Ok 1 |> Result.defaultWith (fun error -> 99) // evaluates to 1 - Error 2 |> Result.defaultWith (fun error -> 99) // evaluates to 99 - - - - - Gets the value of the result if the result is Ok, otherwise returns the specified default value. - - The specified default value. - The input result. - - The result if the result is Ok, else the default value. - - - - Result.defaultValue 2 (Error 3) // evaluates to 2 - Result.defaultValue 2 (Ok 1) // evaluates to 1 - - - - - Returns true if the result is Error. - - The input result. - - True if the result is Error. - - - - Ok 42 |> Result.isError // evaluates to false - Error 42 |> Result.isError // evaluates to true - - - - - Returns true if the result is Ok. - The input result. - - True if the result is OK. - - - - Ok 42 |> Result.isOk // evaluates to true - Error 42 |> Result.isOk // evaluates to false - - - - - bind f inp evaluates to match inp with Error e -> Error e | Ok x -> f x - - A function that takes the value of type T from a result and transforms it into - a result containing a value of type U. - The input result. - - A result of the output type of the binder. - - - - let tryParse (input: string) = - match System.Int32.TryParse input with - | true, v -> Ok v - | false, _ -> Error "couldn't parse" - - Error "message" |> Result.bind tryParse // evaluates to Error "message" - - Ok "42" |> Result.bind tryParse // evaluates to Ok 42 - - Ok "Forty-two" |> Result.bind tryParse // evaluates to Error "couldn't parse" - - - - - map f inp evaluates to match inp with Error x -> Error (f x) | Ok v -> Ok v. - - A function to apply to the Error result value. - The input result. - - A result of the error value after applying the mapping function, or Ok if the input is Ok. - - - - Ok 1 |> Result.mapError (fun x -> "bar") // evaluates to Ok 1 - - Error "foo" |> Result.mapError (fun x -> "bar") // evaluates to Error "bar" - - - - - map f inp evaluates to match inp with Error e -> Error e | Ok x -> Ok (f x). - - A function to apply to the OK result value. - The input result. - - A result of the input value after applying the mapping function, or Error if the input is Error. - - - - Ok 1 |> Result.map (fun x -> "perfect") // evaluates to Ok "perfect" - - Error "message" |> Result.map (fun x -> "perfect") // evaluates to Error "message" - - - - - Contains operations for working with values of type . - - Choices and Results - - - Returns a string by concatenating count instances of str. - - The number of copies of the input string will be copied. - The input string. - - The concatenated string. - Thrown when count is negative. - - - - "Do it!" |> String.replicate 3 - - Evaluates to "Do it!Do it!Do it!". - - - - Builds a new string whose characters are the results of applying the function mapping - to each character and index of the input string. - - The function to apply to each character and index of the string. - The input string. - - The resulting string. - - - - input |> String.mapi (fun i c -> (i, c)) - - Evaluates to [ (0, 'O'); (1, 'K'); (2, '!') ]. - - - - Builds a new string whose characters are the results of applying the function mapping - to each of the characters of the input string. - - The function to apply to the characters of the string. - The input string. - - The resulting string. - - Changing case to upper for all characters in the input string - - open System - - let input = "Hello there!" - - input |> String.map Char.ToUpper // evaluates "HELLO THERE!" - - - - - Returns the length of the string. - - The input string. - - The number of characters in the string. - - Getting the length of different strings - - String.length null // evaluates 0 - String.length "" // evaluates 0 - String.length "123" // evaluates 3 - - - - - Applies the function action to the index of each character in the string and the - character itself. - - The function to apply to each character and index of the string. - The input string. - - Numbering the characters and printing the associated ASCII code - for each characater in the input string - - let input = "Hello" - input |> String.iteri (fun i c -> printfn "%d. %c %d" (i + 1) c (int c)) - - The sample evaluates as unit, but prints: - - 1. H 72 - 2. e 101 - 3. l 108 - 4. l 108 - 5. o 111 - - - - - Applies the function action to each character in the string. - - The function to be applied to each character of the string. - The input string. - - Printing the ASCII code for each characater in the string - - let input = "Hello" - input |> String.iter (fun c -> printfn "%c %d" c (int c)) - - The sample evaluates as unit, but prints: - - H 72 - e 101 - l 108 - l 108 - o 111 - - - - - Builds 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. - - The number of strings to initialize. - The function to take an index and produce a string to - be concatenated with the others. - - The constructed string. - - Thrown when count is negative. - - Enumerate digits ASCII codes - - String.init 10 (fun i -> int '0' + i |> sprintf "%d ") - - The sample evaluates to: "48 49 50 51 52 53 54 55 56 57 " - - - - Tests if all characters in the string satisfy the given predicate. - - The function to test each character of the string. - The input string. - - True if all characters return true for the predicate and false otherwise. - - Looking for lowercase characters - - open System - - "all are lower" |> String.forall Char.IsLower // evaluates false - - "allarelower" |> String.forall Char.IsLower // evaluates true - - - - - Builds a new string containing only the characters of the input string - for which the given predicate returns "true". - - Returns an empty string if the input string is null - - A function to test whether each character in the input sequence should be included in the output string. - The input string. - - The resulting string. - - Filtering out just alphanumeric characters - - open System - - let input = "0 1 2 3 4 5 6 7 8 9 a A m M" - - input |> String.filter Uri.IsHexDigit // evaluates "123456789aA" - - - Filtering out just digits - - open System - - "hello" |> String.filter Char.IsDigit // evaluates "" - - - - - Tests if any character of the string satisfies the given predicate. - - The function to test each character of the string. - The input string. - - True if any character returns true for the predicate and false otherwise. - - Looking for uppercase characters - - open System - - "Yoda" |> String.exists Char.IsUpper // evaluates true - - "nope" |> String.exists Char.IsUpper // evaluates false - - - - - Returns a new string made by concatenating the given strings - with separator sep, that is a1 + sep + ... + sep + aN. - The separator string to be inserted between the strings - of the input sequence. - The sequence of strings to be concatenated. - - A new string consisting of the concatenated strings separated by - the separation string. - Thrown when strings is null. - - - - let input1 = ["Stefan"; "says:"; "Hello"; "there!"] - - input1 |> String.concat " " // evaluates "Stefan says: Hello there!" - - let input2 = [0..9] |> List.map string - - input2 |> String.concat "" // evaluates "0123456789" - input2 |> String.concat ", " // evaluates "0, 1, 2, 3, 4, 5, 6, 7, 8, 9" - - let input3 = ["No comma"] - - input3 |> String.concat "," // evaluates "No comma" - - - - - Builds 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. - - The function to produce a string from each character of the input string. - The input string. - - The concatenated string. - - The following samples shows how to interspace spaces in a text - - let input = "Stefan says: Hi!" - - input |> String.collect (sprintf "%c ") - - The sample evaluates to "S t e f a n s a y s : H i ! " - - - How to show the ASCII representation of a very secret text - - "Secret" |> String.collect (fun chr -> int chr |> sprintf "%d ") - - The sample evaluates to "83 101 99 114 101 116 " - - - - 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. - - - Strings and Text - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - - - Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' - - Language Primitives - - - Represents a statically-analyzed format associated with writing to a . The type parameter indicates the - arguments and return type of the format operation. - - - 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 associated with writing to a . The type parameter indicates the - arguments and return type of the format operation. - - - Represents a statically-analyzed format associated with writing to a . 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 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 . The first type parameter indicates the - arguments of the format operation and the last the overall return type. - - - Print to a string buffer and raise an exception with the given - result. Helper printers must return strings. - - The input formatter. - - The arguments of the formatter. - - - - failwithf "That's wrong. Five = %d and six = %d" (3+2) (3+3) - - Throws Exception with message "That's wrong. Five = 5 and six = 6". - - - - sprintf, but call the given 'final' function to generate the result. - See kprintf. - - The function called to generate a result from the formatted string. - The input formatter. - - The arguments of the formatter. - - Using % format patterns: - - open Printf - - ksprintf (fun s -> s + ", done!") $"Write three = {1+2}" - - Evaluates to "Write three = 3, done!". - - - - 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. - - The function called after formatting to generate the format result. - The input formatter. - - The arguments of the formatter. - - Using % format patterns: - - open Printf - - kprintf (fun s -> s + ", done!") $"Write three = {1+2}" - - Evaluates to "Write three = 3, done!". - - - - fprintf, but call the given 'final' function to generate the result. - See kprintf. - - The function called after formatting to generate the format result. - The input TextWriter. - The input formatter. - - The arguments of the formatter. - - Using % format patterns: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - kfprintf (fun () -> file.Close()) file $"Write three = {1+2}" - - Writes "Write three = 3" to out.txt. - - - - bprintf, but call the given 'final' function to generate the result. - See kprintf. - - The function called after formatting to generate the format result. - The input StringBuilder. - The input formatter. - - The arguments of the formatter. - - Using % format patterns: - - open Printf - open System.Text - - let buffer = new StringBuilder() - - kbprintf (fun () -> buffer.ToString()) buffer "Write five = %d" (3+2) - - Evaluates to "Write five = 5". - - - - Print to a string via an internal string buffer and return - the result as a string. Helper printers must return strings. - - The input formatter. - - The formatted string. - - - - sprintf "Write five = %d and six = %d" (3+2) (3+3) - - Evaluates to "Write five = 5 and six = 6". - - - - Formatted printing to stdout, adding a newline. - - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - printfn $"Write three = {1+2}" - printfn $"Write four = {2+2}" - - After evaluation the two lines are written to stdout. - - - Using % format patterns: - - printfn "Write five = %d" (3+2) - printfn "Write six = %d" (3+3) - - After evaluation the two lines are written to stdout. - - - - Formatted printing to stdout - - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - printf $"Write three = {1+2}" - - After evaluation the text "Write three = 3" is written to stdout. - - - Using % format patterns: - - printf "Write five = %d" (3+2) - - After evaluation the text "Write five = 5" is written to stdout. - - - - Formatted printing to stderr, adding a newline - - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - eprintfn $"Write three = {1+2}" - eprintfn $"Write four = {2+2}" - - After evaluation two lines are written to stderr. - - - Using % format patterns: - - eprintfn "Write five = %d" (3+2) - eprintfn "Write six = %d" (3+3) - - After evaluation two lines are written to stderr. - - - - Formatted printing to stderr - - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - eprintf $"Write three = {1+2}" - - After evaluation the text "Write three = 3" is written to stderr. - - - Using % format patterns: - - eprintf "Write five = %d" (3+2) - - After evaluation the text "Write five = 5" is written to stderr. - - - - Print to a text writer, adding a newline - - The TextWriter to print to. - The input formatter. - - The return type and arguments of the formatter. - - - Using interpolated strings: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - fprintfn file $"Write three = {1+2}" - fprintfn file $"Write four = {2+2}" - file.Close() - - After evaluation the file contains two lines. - - - Using % format patterns: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - fprintfn file "Write five = %d" (3+2) - fprintfn file "Write six = %d" (3+3) - file.Close() - - After evaluation the file contains two lines. - - - - Print to a text writer. - - The TextWriter to print to. - The input formatter. - - The return type and arguments of the formatter. - - Using interpolated strings: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - fprintf file $"Write three = {1+2}" - file.Close() - - After evaluation the file contains the text "Write three = 3". - - - Using % format patterns: - - open Printf - open System.IO - - let file = File.CreateText("out.txt") - - fprintf file "Write five = %d" (3+2) - file.Close() - - After evaluation the file contains the text "Write five = 5". - - - - Print to a - - The StringBuilder to print to. - The input format or interpolated string. - - The return type and arguments of the formatter. - - Using interpolated strings: - - open Printf - open System.Text - - let buffer = new StringBuilder() - - bprintf buffer $"Write three = {1+2}" - buffer.ToString() - - Evaluates to "Write three = 3". - - - Using % format patterns: - - open Printf - open System.Text - - let buffer = new StringBuilder() - - bprintf buffer "Write five = %d" (3+2) - buffer.ToString() - - Evaluates to "Write five = 5". - - - - 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]. - - Strings and Text - - - - Return the resulting list - - - - - Add multiple elements to the collector and return the resulting array - - - - - Add multiple elements to the collector - - - - - Add an element to the collector - - - - - Collects elements and builds an array - - - - - Return the resulting list - - - - - Add multiple elements to the collector and return the resulting list - - - - - Add multiple elements to the collector - - - - - Add an element to the collector - - - - - Collects elements and builds a list - - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - A new enumerator for the sequence. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - A reference to the sequence. - - A 0, 1, and 2 respectively indicate Stop, Yield, and Goto conditions for the sequence generator. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - A new sequence generator for the expression. - - - The F# compiler emits implementations of this type for compiled sequence expressions. - - - Creates an instance of the attribute - NoEagerConstraintApplicationAttribute - - - Adding this attribute to the method adjusts the processing of some generic methods - during overload resolution. - - During overload resolution, caller arguments are matched with called arguments - to extract type information. By default, when the caller argument type is unconstrained (for example - a simple value x without known type information), and a method qualifies for - lambda constraint propagation, then member trait constraints from a method overload - are eagerly applied to the caller argument type. This causes that overload to be preferred, - regardless of other method overload resolution rules. Using this attribute suppresses this behaviour. - - - - Consider the following overloads: - - type OverloadsWithSrtp() = - [<NoEagerConstraintApplicationAttribute>] - static member inline SomeMethod< ^T when ^T : (member Number: int) > (x: ^T, f: ^T -> int) = 1 - static member SomeMethod(x: 'T list, f: 'T list -> int) = 2 - - let inline f x = - OverloadsWithSrtp.SomeMethod (x, (fun a -> 1)) - - With the attribute, the overload resolution fails, because both members are applicable. - Without the attribute, the overload resolution succeeds, because the member constraint is - eagerly applied, making the second member non-applicable. - - Attributes - - - - Defines the implementation of the code run after the creation of a struct state machine. - - - - - Defines the implementation of the SetStateMachine method for a struct state machine. - - - - - Defines the implementation of the MoveNext method for a struct state machine. - - - - - A special compiler-recognised delegate type for specifying blocks of resumable code - with access to the state machine. - - - - - Represents the runtime continuation of a resumable state machine created dynamically - - - - - The continuation of the state machine - - - - - Additional data associated with the state machine - - - - - The continuation of the state machine - - - - - Additional data associated with the state machine - - - - - Executes the SetStateMachine implementation of the state machine - - - - - Executes the MoveNext implementation of the state machine - - - - - Create dynamic information for a state machine - - - - - Represents the delegated runtime continuation of a resumable state machine created dynamically - - - - - Copy-out or copy-in the data of the state machine - - - - - Get the resumption point of the state machine - - - - - Copy-out or copy-in the data of the state machine - - - - Represents the delegated runtime continuation for a resumable state machine created dynamically - This field is removed from state machines generated using '__stateMachine'. Resumable code - used in state machines which accesses this field will raise a runtime exception. - - - - When statically compiled, holds the continuation goto-label further execution of the state machine - - - - - When statically compiled, holds the data for the state machine - - - - - Acts as a template for struct state machines introduced by __stateMachine, and also as a reflective implementation - - - - - Get the static parameters for a provided method. - - - A method returned by GetMethod on a provided type - - The static parameters of the provided method, if any - - - - Apply static arguments to a provided method that accepts static arguments. - - The provider must return a provided method with the given mangled name. - the provided method definition which has static parameters - the full name of the method that must be returned, including encoded representations of static parameters - the values of the static parameters, indexed by name - - The provided method definition corresponding to the given static parameter values - - - - Represents additional, optional information for a type provider component - - - - - Triggered when an assumption changes that invalidates the resolutions so far reported by the provider - - - - - Triggered when an assumption changes that invalidates the resolutions so far reported by the provider - - - - - Triggered when an assumption changes that invalidates the resolutions so far reported by the provider - - - - - Get the static parameters for a provided type. - - - A type returned by GetTypes or ResolveTypeName - - - - - - Gets the namespaces provided by the type provider. - - - - - Called by the compiler to ask for an Expression tree to replace the given MethodBase with. - - - MethodBase that was given to the compiler by a type returned by a GetType(s) call. - Expressions that represent the parameters to this call. - - An expression that the compiler will use in place of the given method base. - - - - Get the physical contents of the given logical provided assembly. - - - - - Apply static arguments to a provided type that accepts static arguments. - - - The provider must return a type with the given mangled name. - - the provided type definition which has static parameters - the full path of the type, including encoded representations of static parameters - the static parameters, indexed by name - - - - - - Represents an instantiation of a type provider component. - - - - - Namespace name the provider injects types into. - - - - - Compilers call this method to query a type provider for a type name. - - Resolver should return a type called name in namespace NamespaceName or null if the type is unknown. - - - - - - The top-level types - - - - - - The sub-namespaces in this namespace. An optional member to prevent generation of namespaces until an outer namespace is explored. - - - - - Represents a namespace provided by a type provider component. - - - - - Get the full path to use for temporary files for the type provider instance. - - - - - version of referenced system runtime assembly - - - - - Get the full path to referenced assembly that caused this type provider instance to be created. - - - - - Get the full path to use to resolve relative paths in any file name arguments given to the type provider instance. - - - - - Get the referenced assemblies for the type provider instance. - - - - - Indicates if the type provider host responds to invalidation events for type provider instances. - - - - - Indicates if the type provider instance is used in an environment which executes provided code such as F# Interactive. - - - - - Get the full path to use for temporary files for the type provider instance. - - - - - version of referenced system runtime assembly - - - - - Get the full path to referenced assembly that caused this type provider instance to be created. - - - - - Get the full path to use to resolve relative paths in any file name arguments given to the type provider instance. - - - - - Get the referenced assemblies for the type provider instance. - - - - - Indicates if the type provider host responds to invalidation events for type provider instances. - - - - - Indicates if the type provider instance is used in an environment which executes provided code such as F# Interactive. - - - - - Checks if given type exists in target system runtime library - - - - - Create a configuration which calls the given functions for the corresponding operation. - - - - - Create a configuration which calls the given function for the corresponding operation. - - - - - If the class that implements ITypeProvider has a constructor that accepts TypeProviderConfig - then it will be constructed with an instance of TypeProviderConfig. - - - - Creates an instance of the attribute - TypeProviderEditorHideMethodsAttribute - - - Indicates that a code editor should hide all System.Object methods from the intellisense menus for instances of a provided type - - - Gets or sets the line for the location. - - - Gets or sets the file path for the definition location. - - - Gets or sets the column for the location. - - - Gets or sets the line for the location. - - - Gets or sets the file path for the definition location. - - - Gets or sets the column for the location. - - - A type provider may provide an instance of this attribute to indicate the definition location for a provided type or member. - - - Gets the comment text. - - - Creates an instance of the attribute - TypeProviderXmlDocAttribute - - - A type provider may provide an instance of this attribute to indicate the documentation to show for - a provided type or member. - - - Gets the assembly name. - - - Creates an instance of the attribute - TypeProviderAssemblyAttribute - The name of the design-time assembly for this type provider. - - - Creates an instance of the attribute - TypeProviderAssemblyAttribute - - - Place this attribute on a runtime assembly to indicate that there is a corresponding design-time - assembly that contains a type provider. Runtime and design-time assembly may be the same. - - - Additional type attribute flags related to provided types - - - Creates an instance of the attribute - TypeProviderAttribute - - - Place on a class that implements ITypeProvider to extend the compiler - - - Represents the '1' measure expression when returned as a generic argument of a provided type. - - - Represents the inverse of a measure expressions when returned as a generic argument of a provided type. - - - Represents the product of two measure expressions when returned as a generic argument of a provided type. - - - Library functionality for supporting type providers and code generated by the F# compiler. See - also F# Type Providers in the F# Language Guide. - - - - Creates an anonymous event with the given handlers. - - A function to handle adding a delegate for the event to trigger. - A function to handle removing a delegate that the event triggers. - A function to produce the delegate type the event can trigger. - - The initialized event. - - - The F# compiler emits calls to this function to implement the use operator for F# sequence - expressions. - - The resource to be used and disposed. - The input sequence. - - The result sequence. - - - The F# compiler emits calls to this function to implement the compiler-intrinsic - conversions from untyped IEnumerable sequences to typed sequences. - - An initializer function. - A function to iterate and test if end of sequence is reached. - A function to retrieve the current element. - - The resulting typed sequence. - - - The F# compiler emits calls to this function to - implement the try/with operator for F# sequence expressions. - - The input sequence. - Pattern matches after 'when' converted to return 1 - Pattern matches after 'when' with their actual execution code - - The result sequence. - - - The F# compiler emits calls to this function to - implement the try/finally operator for F# sequence expressions. - - The input sequence. - A computation to be included in an enumerator's Dispose method. - - The result sequence. - - - The F# compiler emits calls to this function to - implement the while operator for F# sequence expressions. - - A function that indicates whether iteration should continue. - The input sequence. - - The result sequence. - - - A group of functions used as part of the compiled representation of F# sequence expressions. - - - - Statically generates a closure struct type based on ResumableStateMachine, - At runtime an instance of the new struct type is populated and 'afterMethod' is called - to consume it. - - - - At compile-time, the ResumableStateMachine type guides the generation of a new struct type by the F# compiler - with closure-capture fields in a way similar to an object expression. - Any mention of the ResumableStateMachine type in any the 'methods' is rewritten to this - fresh struct type. The 'methods' are used to implement the interfaces on ResumableStateMachine and are also rewritten. - The 'after' method is then executed and must eliminate the ResumableStateMachine. For example, - its return type must not include ResumableStateMachine. - - Gives the implementation of the MoveNext method on IAsyncStateMachine. - Gives the implementation of the SetStateMachine method on IAsyncStateMachine. - Gives code to execute after the generation of the state machine and to produce the final result. - - - - Indicates to jump to a resumption point within resumable code. - This may be the first statement in a MoveNextMethodImpl. - The integer must be a valid resumption point within this resumable code. - - - - - - Indicates a resumption point within resumable code - - - - - When used in a conditional, statically determines whether the 'then' branch - represents valid resumable code and provides an alternative implementation - if not. - - - - - Indicates a named debug point arising from the context of inlined code. - - - Only a limited range of debug point names are supported. - - If the debug point name is the empty string then the range used for the debug point will be - the range of the outermost expression prior to inlining. - - If the debug point name is ForLoop.InOrToKeyword and the code was ultimately - from a for .. in .. do or for .. = .. to .. do construct in a computation expression, - de-sugared to an inlined builder.For call, then the name "ForLoop.InOrToKeyword" can be used. - The range of the debug point will be precisely the range of the in or to keyword. - - If the name doesn't correspond to a known debug point arising from the original source context, then - an opt-in warning 3514 is emitted, and the range used for the debug point will be - the range of the root expression prior to inlining. - - - - - Contains compiler intrinsics related to the definition of state machines. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - The dynamic implementation of the corresponding operation. This operation should not be used directly. - - - - - Specifies resumable code which does nothing - - - - - Specifies resumable code which executes a loop - - - - - Specifies resumable code which executes with 'use' semantics - - - - - Specifies resumable code which executes with try/with semantics - - - - - Specifies resumable code which executes with try/finally semantics - - - - - Specifies resumable code which executes with try/finally semantics - - - - - Specifies resumable code which iterates yields - - - - - Specifies resumable code which iterates an input sequence - - - - - Creates resumable code whose definition is a delayed function - - - - - Sequences one section of resumable code after another - - - - - Contains functions for composing resumable code blocks - - - - Builds a query using query syntax and operators. - - - - let findEvensAndSortAndDouble(xs: System.Linq.IQueryable<int>) = - query { - for x in xs do - where (x % 2 = 0) - sortBy x - select (x+x) - } - - let data = [1; 2; 6; 7; 3; 6; 2; 1] - - findEvensAndSortAndDouble (data.AsQueryable()) |> Seq.toList - - Evaluates to [4; 4; 12; 12]. - - - - An active pattern to force the execution of values of type Lazy<_>. - - - - let f (Lazy v) = v + v - - let v = lazy (printf "eval!"; 5+5) - - f v - f v - - Evaluates to 10. The text eval! is printed once on the first invocation of f. - - - - Special prefix operator for splicing untyped expressions into quotation holes. - - - - let f v = <@@ (%%v: int) + (%%v: int) @@> - - f <@@ 5 + 5 @@>;; - - Evaluates to an untyped quotation equivalent to <@@ (5 + 5) + (5 + 5) @@> - - - - Special prefix operator for splicing typed expressions into quotation holes. - - - - let f v = <@ %v + %v @> - - f <@ 5 + 5 @>;; - - Evaluates to a quotation equivalent to <@ (5 + 5) + (5 + 5) @> - - - - Builds a 2D array from a sequence of sequences of elements. - - - - array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ] - - Evaluates to a 2x2 zero-based array with contents [[1.0; 2.0]; [3.0; 4.0]] - - - - Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. - - - - let table = readOnlyDict [ (1, 100); (2, 200) ] - - table[1] - - Evaluates to 100. - - - - - let table = readOnlyDict [ (1, 100); (2, 200) ] - - table[3] - - Throws System.Collections.Generic.KeyNotFoundException. - - - - Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. - - - - let table = dict [ (1, 100); (2, 200) ] - - table[1] - - Evaluates to 100. - - - - - let table = dict [ (1, 100); (2, 200) ] - - table[3] - - Throws System.Collections.Generic.KeyNotFoundException. - - - - 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. - - - - int8 -12 - - Evaluates to -12y. - - - - - int8 "3" - - Evaluates to 3y. - - - - 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. - - - - uint8 12 - - Evaluates to 12uy. - - - - 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. - - - - double 45 - - Evaluates to 45.0. - - - - - double 12.3f - - Evaluates to 12.30000019. - - - - 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. - - - - single 45 - - Evaluates to 45.0f. - - - - Builds an asynchronous workflow using computation expression syntax. - - - - let sleepExample() = - async { - printfn "sleeping" - do! Async.Sleep 10 - printfn "waking up" - return 6 - } - - sleepExample() |> Async.RunSynchronously - - - - - Builds a set from a sequence of objects. The objects are indexed using generic comparison. - - The input sequence of elements. - - The created set. - - - - let values = set [ 1; 2; 3; 5; 7; 11 ] - - Evaluates to a set containing the given numbers. - - - - Print to a file using the given format, and add a newline. - - The file TextWriter. - The formatter. - - The formatted result. - - See Printf.fprintfn (link: ) for examples. - - - Print to a file using the given format. - - The file TextWriter. - The formatter. - - The formatted result. - - See Printf.fprintf (link: ) for examples. - - - Print to a string buffer and raise an exception with the given - result. Helper printers must return strings. - - The formatter. - - The formatted result. - - See Printf.failwithf (link: ) for examples. - - - Print to a string using the given format. - - The formatter. - - The formatted result. - - See Printf.sprintf (link: ) for examples. - - - Print to stderr using the given format, and add a newline. - - The formatter. - - The formatted result. - - See Printf.eprintfn (link: ) for examples. - - - Print to stderr using the given format. - - The formatter. - - The formatted result. - - See Printf.eprintf (link: ) for examples. - - - Print to stdout using the given format, and add a newline. - - The formatter. - - The formatted result. - - See Printf.printfn (link: ) for examples. - - - Print to stdout using the given format. - - The formatter. - - The formatted result. - - See Printf.printf (link: ) for examples. - - - Converts the argument to signed byte. - This is a direct, checked 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. - - - - Checked.int8 -12 - - Evaluates to -12y. - - - - - Checked.int8 "129" - - Throws System.OverflowException. - - - - Converts the argument to byte. - This is a direct, checked 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. - - - - Checked.uint8 12 - - Evaluates to -12y. - - - - - Checked.uint8 -12 - - Throws System.OverflowException. - - - - A set of extra operators and functions. This module is automatically opened in all F# code. - - Basic Operators - - - diff --git a/lib/fcs/nojaf/Release/FSharp.DependencyManager.Nuget.dll b/lib/fcs/nojaf/Release/FSharp.DependencyManager.Nuget.dll deleted file mode 100644 index acdd48da1c..0000000000 Binary files a/lib/fcs/nojaf/Release/FSharp.DependencyManager.Nuget.dll and /dev/null differ diff --git a/lib/fcs/nojaf/Release/FSharp.DependencyManager.Nuget.xml b/lib/fcs/nojaf/Release/FSharp.DependencyManager.Nuget.xml deleted file mode 100644 index 9d70483cee..0000000000 --- a/lib/fcs/nojaf/Release/FSharp.DependencyManager.Nuget.xml +++ /dev/null @@ -1,160 +0,0 @@ - - -FSharp.DependencyManager.Nuget - - - - version - (Originally from FSDependencyManager.txt:7) - - - - - Unable to apply implicit argument number %d - (Originally from FSDependencyManager.txt:4) - - - - - Timed out resolving packages, process: '%s' '%s' - (Originally from FSDependencyManager.txt:10) - - - - - The source directory '%s' not found - (Originally from FSDependencyManager.txt:9) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - %s requires a value - (Originally from FSDependencyManager.txt:3) - - - - - Not used - (Originally from FSDependencyManager.txt:5) - - - - - Missing value for timeout - (Originally from FSDependencyManager.txt:12) - - - - - Load Nuget Package - (Originally from FSDependencyManager.txt:6) - - - - - Invalid value for timeout '%s', valid values: none, -1 and integer milliseconds to wait - (Originally from FSDependencyManager.txt:11) - - - - - with the highest version - (Originally from FSDependencyManager.txt:8) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - PackageManager can not reference the System Package '%s' - (Originally from FSDependencyManager.txt:2) - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - If set to true, then all error messages will just return the filled 'holes' delimited by ',,,'s - this is for language-neutral testing (e.g. localization-invariant baselines). - - - - - %s for F# %s - (Originally from C:\Users\nojaf\Projects\fsharp\src\Compiler\Facilities\UtilsStrings.txt:2) - - - - - Microsoft (R) F# Compiler version %s - (Originally from C:\Users\nojaf\Projects\fsharp\src\Compiler\Facilities\UtilsStrings.txt:1) - - - - - The result of building the package resolution files. - - - - - Succeded? - - - - - The resolution output log - - - - - The resolution error log (process stderr) - - - - - The source code file paths - - - - - The roots to package directories - This points to the root of each located package. - The layout of the package manager will be package manager specific. - however, the dependency manager dll understands the nuget package layout - and so if the package contains folders similar to the nuget layout then - the dependency manager will be able to probe and resolve any native dependencies - required by the nuget package. - - This path is also equivant to - #I @"c:\somepath\to\packages\ResolvedPackage\1.1.1\" - - - - - The resolution paths - the full paths to selected resolved dll's. - In scripts this is equivalent to #r @"c:\somepath\to\packages\ResolvedPackage\1.1.1\lib\netstandard2.0\ResolvedAssembly.dll" - - - - - The results of ResolveDependencies - - - - - Return a string array delimited by commas - Note that a quoted string is not going to be mangled into pieces. - - - - diff --git a/src/Fable.Compiler/Fable.Compiler.fsproj b/src/Fable.Compiler/Fable.Compiler.fsproj index d63896e360..c08ea78bf4 100644 --- a/src/Fable.Compiler/Fable.Compiler.fsproj +++ b/src/Fable.Compiler/Fable.Compiler.fsproj @@ -32,11 +32,9 @@ - - - - - + + + @@ -48,10 +46,8 @@ - - diff --git a/src/Fable.Transforms/Fable.Transforms.fsproj b/src/Fable.Transforms/Fable.Transforms.fsproj index 071fe7198d..5facac19c6 100644 --- a/src/Fable.Transforms/Fable.Transforms.fsproj +++ b/src/Fable.Transforms/Fable.Transforms.fsproj @@ -49,9 +49,8 @@ - - - - + + +